类 ArrayInitializationMatcher
java.lang.Object
proguard.classfile.util.ArrayInitializationMatcher
This class finds sequences of instructions that correspond to primitive array initializations.
Such initializations may be represented more efficiently in other bytecode languages.
-
构造器概要
构造器构造器说明Creates a new ArrayInitializationMatcher.ArrayInitializationMatcher(PartialEvaluator partialEvaluator) Creates a new ArrayInitializationMatcher that will use the given partial evaluator. -
方法概要
修饰符和类型方法说明array()Returns the recent static array initialization.intReturns the last offset of the recent static array initialization.intReturns 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
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
Returns the recent static array initialization.
-