类 LivenessAnalyzer
- java.lang.Object
-
- proguard.evaluation.LivenessAnalyzer
-
- 所有已实现的接口:
AttributeVisitor,ExceptionInfoVisitor,InstructionVisitor
public class LivenessAnalyzer extends java.lang.Object implements AttributeVisitor, InstructionVisitor, ExceptionInfoVisitor
ThisAttributeVisitoranalyzes the liveness of the variables in the code attributes that it visits, based on partial evaluation.
-
-
构造器概要
构造器 构造器 说明 LivenessAnalyzer()Creates a new LivenessAnalyzer.LivenessAnalyzer(PartialEvaluator partialEvaluator, boolean runPartialEvaluator, InitializationFinder initializationFinder, boolean runInitializationFinder)Creates a new LivenessAnalyzer that will use the given partial evaluator and initialization finder.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanisAliveAfter(int instructionOffset, int variableIndex)Returns whether the specified variable is alive after the instruction at the given offset.booleanisAliveBefore(int instructionOffset, int variableIndex)Returns whether the specified variable is alive before the instruction at the given offset.booleanisCategory2(int instructionOffset, int variableIndex)Returns whether the specified variable takes up two entries after the instruction at the given offset.booleanisTraced(int instructionOffset)Returns whether the instruction at the given offset has ever been executed during the partial evaluation.voidsetAliveAfter(int instructionOffset, int variableIndex, boolean alive)Sets whether the specified variable is alive after the instruction at the given offset.voidsetAliveBefore(int instructionOffset, int variableIndex, boolean alive)Sets whether the specified variable is alive before the instruction at the given offset.voidsetCategory2(int instructionOffset, int variableIndex, boolean category2)Sets whether the specified variable takes up two entries after the instruction at the given offset.voidvisitAnyAttribute(Clazz clazz, Attribute attribute)Visits any Attribute instance.voidvisitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)Visits any Instruction instance.voidvisitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)voidvisitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)voidvisitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo)voidvisitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction)-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 proguard.classfile.attribute.visitor.AttributeVisitor
visitAnnotationDefaultAttribute, visitAnyAnnotationsAttribute, visitAnyParameterAnnotationsAttribute, visitAnyTypeAnnotationsAttribute, visitBootstrapMethodsAttribute, visitConstantValueAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitEnclosingMethodAttribute, visitExceptionsAttribute, visitInnerClassesAttribute, visitLineNumberTableAttribute, visitLocalVariableTableAttribute, visitLocalVariableTypeTableAttribute, visitMethodParametersAttribute, visitModuleAttribute, visitModuleMainClassAttribute, visitModulePackagesAttribute, visitNestHostAttribute, visitNestMembersAttribute, visitPermittedSubclassesAttribute, visitRecordAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleParameterAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleParameterAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSourceDebugExtensionAttribute, visitSourceDirAttribute, visitSourceFileAttribute, visitStackMapAttribute, visitStackMapTableAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitUnknownAttribute
-
从接口继承的方法 proguard.classfile.instruction.visitor.InstructionVisitor
visitAnySwitchInstruction, visitBranchInstruction, visitLookUpSwitchInstruction, visitSimpleInstruction, visitTableSwitchInstruction
-
-
-
-
构造器详细资料
-
LivenessAnalyzer
public LivenessAnalyzer()
Creates a new LivenessAnalyzer.
-
LivenessAnalyzer
public LivenessAnalyzer(PartialEvaluator partialEvaluator, boolean runPartialEvaluator, InitializationFinder initializationFinder, boolean runInitializationFinder)
Creates a new LivenessAnalyzer that will use the given partial evaluator and initialization finder.- 参数:
partialEvaluator- the evaluator to be used for the analysis.runPartialEvaluator- specifies whether to run this evaluator on every code attribute that is visited.initializationFinder- the initialization finder to be used for the analysis.runInitializationFinder- specifies whether to run this initialization finder on every code attribute that is visited.
-
-
方法详细资料
-
isTraced
public boolean isTraced(int instructionOffset)
Returns whether the instruction at the given offset has ever been executed during the partial evaluation.
-
isAliveBefore
public boolean isAliveBefore(int instructionOffset, int variableIndex)Returns whether the specified variable is alive before the instruction at the given offset.
-
setAliveBefore
public void setAliveBefore(int instructionOffset, int variableIndex, boolean alive)Sets whether the specified variable is alive before the instruction at the given offset.
-
isAliveAfter
public boolean isAliveAfter(int instructionOffset, int variableIndex)Returns whether the specified variable is alive after the instruction at the given offset.
-
setAliveAfter
public void setAliveAfter(int instructionOffset, int variableIndex, boolean alive)Sets whether the specified variable is alive after the instruction at the given offset.
-
isCategory2
public boolean isCategory2(int instructionOffset, int variableIndex)Returns whether the specified variable takes up two entries after the instruction at the given offset.
-
setCategory2
public void setCategory2(int instructionOffset, int variableIndex, boolean category2)Sets whether the specified variable takes up two entries after the instruction at the given offset.
-
visitAnyAttribute
public void visitAnyAttribute(Clazz clazz, Attribute attribute)
从接口复制的说明:AttributeVisitorVisits any Attribute instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyAttribute在接口中AttributeVisitor
-
visitCodeAttribute
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
- 指定者:
visitCodeAttribute在接口中AttributeVisitor
-
visitAnyInstruction
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)
从接口复制的说明:InstructionVisitorVisits any Instruction instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyInstruction在接口中InstructionVisitor
-
visitVariableInstruction
public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction)
- 指定者:
visitVariableInstruction在接口中InstructionVisitor
-
visitConstantInstruction
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
- 指定者:
visitConstantInstruction在接口中InstructionVisitor
-
visitExceptionInfo
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo)
- 指定者:
visitExceptionInfo在接口中ExceptionInfoVisitor
-
-