类 ArrayInitializationMatcher
- java.lang.Object
-
- proguard.classfile.util.ArrayInitializationMatcher
-
public class ArrayInitializationMatcher extends java.lang.ObjectThis class finds sequences of instructions that correspond to primitive array initializations. Such initializations may be represented more efficiently in other bytecode languages.
-
-
构造器概要
构造器 构造器 说明 ArrayInitializationMatcher()Creates a new ArrayInitializationMatcher.ArrayInitializationMatcher(PartialEvaluator partialEvaluator)Creates a new ArrayInitializationMatcher that will use the given partial evaluator.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 java.lang.Objectarray()Returns the recent static array initialization.intarrayInitializationEnd()Returns the last offset of the recent static array initialization.intarrayInitializationStart()Returns the first offset of the recent static array initialization, i.e. the first initialization instruction after the newarray.booleanmatchesArrayInitialization(Clazz clazz, Method method, CodeAttribute codeAttribute, int newArrayOffset, SimpleInstruction newArrayInstruction)Returns whether the code fragment starting at the specified newarray instruction is followed by a static array initialization.
-
-
-
构造器详细资料
-
ArrayInitializationMatcher
public ArrayInitializationMatcher()
Creates a new ArrayInitializationMatcher.
-
ArrayInitializationMatcher
public ArrayInitializationMatcher(PartialEvaluator partialEvaluator)
Creates a new ArrayInitializationMatcher that will use the given partial evaluator. The evaluator must have been initialized before trying to match any array initializations.- 参数:
partialEvaluator- the evaluator to be used for the analysis.
-
-
方法详细资料
-
matchesArrayInitialization
public boolean matchesArrayInitialization(Clazz clazz, Method method, CodeAttribute codeAttribute, int newArrayOffset, SimpleInstruction newArrayInstruction)
Returns whether the code fragment starting at the specified newarray instruction is followed by a static array initialization.- 参数:
clazz- the class.method- the method.codeAttribute- the code attribute.newArrayOffset- the offset of the newarray instruction.newArrayInstruction- the newarray instruction.- 返回:
- whether there is a static array initialization.
-
arrayInitializationStart
public int arrayInitializationStart()
Returns the first offset of the recent static array initialization, i.e. the first initialization instruction after the newarray.
-
arrayInitializationEnd
public int arrayInitializationEnd()
Returns the last offset of the recent static array initialization.
-
array
public java.lang.Object array()
Returns the recent static array initialization.
-
-