类 CodeAttributeEditor
- java.lang.Object
-
- proguard.classfile.editor.CodeAttributeEditor
-
- 所有已实现的接口:
LocalVariableTargetElementVisitor,TargetInfoVisitor,TypeAnnotationVisitor,StackMapFrameVisitor,VerificationTypeVisitor,AttributeVisitor,ExceptionInfoVisitor,LineNumberInfoVisitor,LocalVariableInfoVisitor,LocalVariableTypeInfoVisitor,InstructionVisitor
public class CodeAttributeEditor extends java.lang.Object implements AttributeVisitor, InstructionVisitor, ExceptionInfoVisitor, StackMapFrameVisitor, VerificationTypeVisitor, LineNumberInfoVisitor, LocalVariableInfoVisitor, LocalVariableTypeInfoVisitor, TypeAnnotationVisitor, TargetInfoVisitor, LocalVariableTargetElementVisitor
ThisAttributeVisitoraccumulates specified changes to code, and then applies these accumulated changes to the code attributes that it visits.The class also supports labels (
label()) and exception handlers (catch_(int,int,int)) in replacement sequences. They provide local branch offsets inside the replacement sequences (CodeAttributeEditor.Label.offset()). For example, replacing a specified instruction in a method by a sequence of instructions, with the help ofInstructionSequenceBuilder:Clazz clazz = ... Method method = ... CodeAttribute codeAttribute = ... int offset = ... CodeAttributeEditor codeAttributeEditor = new CodeAttributeEditor(); InstructionSequenceBuilder builder = new InstructionSequenceBuilder(clazz); // Create labels and instructions. final CodeAttributeEditor.Label TRY_START = codeAttributeEditor.label(); final CodeAttributeEditor.Label TRY_END = codeAttributeEditor.label(); final CodeAttributeEditor.Label CATCH_END = codeAttributeEditor.label(); final CodeAttributeEditor.Label CATCH_EXCEPTION = codeAttributeEditor.catch_(TRY_START.offset(), TRY_END.offset(), constantPoolEditor.addClassConstant("java/lang/Exception", null)); Instructions[] replacementInstructions = builder .label(TRY_START) ...... .label(TRY_END) .goto_(CATCH_END.offset()) .catch_(CATCH_EXCEPTION) ...... .athrow() .label(CATCH_END) ...... .instructions(); // Prepare the editor for this code. codeAttributeEditor.reset(codeAttribute.u4codeLength); // Edit the code -- in this case, replace an instruction. codeAttributeEditor.replaceInstruction(offset, replacementInstructions); // Apply the changes. codeAttributeEditor.visitCodeAttribute(clazz, method, codeAttribute);
-
-
嵌套类概要
嵌套类 修饰符和类型 类 说明 static classCodeAttributeEditor.LabelThis pseudo-instruction represents a label that marks an instruction offset, for use in the context of the code attribute editor only.
-
字段概要
字段 修饰符和类型 字段 说明 boolean[]deletedInstruction[]postInsertionsInstruction[]preInsertionsInstruction[]preOffsetInsertionsInstruction[]replacementsstatic intRESTORE_PREVIOUS_LINE_NUMBERMagic line number that indicates the previous line number should be restored.
-
构造器概要
构造器 构造器 说明 CodeAttributeEditor()Creates a new CodeAttributeEditor that automatically updates frame sizes and shrinks instructions.CodeAttributeEditor(boolean updateFrameSizes, boolean shrinkInstructions)Creates a new CodeAttributeEditor.
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 CodeAttributeEditor.Labelcatch_(int startOffset, int endOffset, int catchType)Creates a new catch instance that can be used as a pseudo-instruction to mark the start of an exception handler.CodeAttributeEditor.Labelcatch_(int identifier, int startOffset, int endOffset, int catchType)Creates a new catch instance that can be used as a pseudo-instruction to mark the start of an exception handler.voidclearModifications(int instructionOffset)Clears all modifications of the instruction at the given offset.voiddeleteInstruction(int instructionOffset)Remembers to delete the instruction at the given offset.voidextend(int codeLength)Extends the size of the accumulated code changes.intgetNewOffset(int oldOffset)Get the new offset corresponding to the given old offset.voidinsertAfterInstruction(int instructionOffset, Instruction instruction)Remembers to place the given instruction right after the instruction at the given offset.voidinsertAfterInstruction(int instructionOffset, Instruction[] instructions)Remembers to place the given instructions right after the instruction at the given offset.voidinsertBeforeInstruction(int instructionOffset, Instruction instruction)Remembers to place the given instruction right before the instruction at the given offset.voidinsertBeforeInstruction(int instructionOffset, Instruction[] instructions)Remembers to place the given instructions right before the instruction at the given offset.voidinsertBeforeOffset(int instructionOffset, Instruction instruction)Remembers to place the given instruction right before the instruction at the given offset.voidinsertBeforeOffset(int instructionOffset, Instruction[] instructions)Remembers to place the given instructions right before the instruction at the given offset.booleanisModified()Returns whether the code has been modified in any way.booleanisModified(int instructionOffset)Returns whether the instruction at the given offset has been modified in any way.CodeAttributeEditor.Labellabel()Creates a new label that can be used as a pseudo-instruction to mark a local offset.CodeAttributeEditor.Labellabel(int identifier)Creates a new label that can be used as a pseudo-instruction to mark a local offset.CodeAttributeEditor.Labelline(int lineNumber)Creates a new line number instance that will insert the given line number at the current offset.CodeAttributeEditor.Labelline(int lineNumber, java.lang.String source)已过时。CodeAttributeEditor.Labelline(int lineNumber, LineNumberInfoBlock block)Creates a new line number instance that will insert the given line number at the current offset.voidreplaceInstruction(int instructionOffset, Instruction instruction)Remembers to replace the instruction at the given offset by the given instruction.voidreplaceInstruction(int instructionOffset, Instruction[] instructions)Remembers to replace the instruction at the given offset by the given instructions.voidreset(int codeLength)Resets the accumulated code changes for a given anticipated maximum code length.voidundeleteInstruction(int instructionOffset)Remembers not to delete the instruction at the given offset.voidvisitAnyAttribute(Clazz clazz, Attribute attribute)Visits any Attribute instance.voidvisitAnyStackMapFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, StackMapFrame stackMapFrame)Visits any StackMapFrame instance.voidvisitAnyTargetInfo(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfo targetInfo)Visits any TargetInfo instance.voidvisitAnyTypeAnnotationsAttribute(Clazz clazz, TypeAnnotationsAttribute typeAnnotationsAttribute)Visits any TypeAnnotationsAttribute instance.voidvisitAnyVerificationType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VerificationType verificationType)Visits any VerificationType instance.voidvisitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction)voidvisitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)voidvisitCodeAttribute0(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)voidvisitFullFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, FullFrame fullFrame)voidvisitLineNumberInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LineNumberInfo lineNumberInfo)voidvisitLineNumberTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LineNumberTableAttribute lineNumberTableAttribute)voidvisitLocalVariableInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableInfo localVariableInfo)voidvisitLocalVariableTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTableAttribute localVariableTableAttribute)voidvisitLocalVariableTargetElement(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, LocalVariableTargetInfo localVariableTargetInfo, LocalVariableTargetElement localVariableTargetElement)voidvisitLocalVariableTargetInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, LocalVariableTargetInfo localVariableTargetInfo)voidvisitLocalVariableTypeInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeInfo localVariableTypeInfo)voidvisitLocalVariableTypeTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeTableAttribute localVariableTypeTableAttribute)voidvisitLookUpSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LookUpSwitchInstruction lookUpSwitchInstruction)voidvisitMoreZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, MoreZeroFrame moreZeroFrame)voidvisitOffsetTargetInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, OffsetTargetInfo offsetTargetInfo)voidvisitSameOneFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameOneFrame sameOneFrame)voidvisitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)voidvisitStackMapAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapAttribute stackMapAttribute)voidvisitStackMapTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapTableAttribute stackMapTableAttribute)voidvisitTableSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, TableSwitchInstruction tableSwitchInstruction)voidvisitTypeAnnotation(Clazz clazz, TypeAnnotation typeAnnotation)Visits any TypeAnnotation instance.voidvisitUninitializedType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, UninitializedType uninitializedType)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, visitBootstrapMethodsAttribute, visitConstantValueAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitEnclosingMethodAttribute, visitExceptionsAttribute, visitInnerClassesAttribute, 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, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitUnknownAttribute
-
从接口继承的方法 proguard.classfile.instruction.visitor.InstructionVisitor
visitAnyInstruction, visitAnySwitchInstruction
-
从接口继承的方法 proguard.classfile.attribute.preverification.visitor.StackMapFrameVisitor
visitLessZeroFrame, visitSameZeroFrame
-
从接口继承的方法 proguard.classfile.attribute.annotation.target.visitor.TargetInfoVisitor
visitCatchTargetInfo, visitEmptyTargetInfo, visitEmptyTargetInfo, visitEmptyTargetInfo, visitFormalParameterTargetInfo, visitSuperTypeTargetInfo, visitThrowsTargetInfo, visitTypeArgumentTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterTargetInfo, visitTypeParameterTargetInfo
-
从接口继承的方法 proguard.classfile.attribute.annotation.visitor.TypeAnnotationVisitor
visitTypeAnnotation, visitTypeAnnotation, visitTypeAnnotation, visitTypeAnnotation, visitTypeAnnotation
-
从接口继承的方法 proguard.classfile.attribute.preverification.visitor.VerificationTypeVisitor
visitDoubleType, visitFloatType, visitIntegerType, visitLongType, visitNullType, visitObjectType, visitStackDoubleType, visitStackFloatType, visitStackIntegerType, visitStackLongType, visitStackNullType, visitStackObjectType, visitStackTopType, visitStackUninitializedThisType, visitStackUninitializedType, visitTopType, visitUninitializedThisType, visitVariablesDoubleType, visitVariablesFloatType, visitVariablesIntegerType, visitVariablesLongType, visitVariablesNullType, visitVariablesObjectType, visitVariablesTopType, visitVariablesUninitializedThisType, visitVariablesUninitializedType
-
-
-
-
字段详细资料
-
RESTORE_PREVIOUS_LINE_NUMBER
public static final int RESTORE_PREVIOUS_LINE_NUMBER
Magic line number that indicates the previous line number should be restored. The restored line number is the first preceding line number with a different source.- 另请参阅:
- 常量字段值
-
preOffsetInsertions
public Instruction[] preOffsetInsertions
-
preInsertions
public Instruction[] preInsertions
-
replacements
public Instruction[] replacements
-
postInsertions
public Instruction[] postInsertions
-
deleted
public boolean[] deleted
-
-
构造器详细资料
-
CodeAttributeEditor
public CodeAttributeEditor()
Creates a new CodeAttributeEditor that automatically updates frame sizes and shrinks instructions.
-
CodeAttributeEditor
public CodeAttributeEditor(boolean updateFrameSizes, boolean shrinkInstructions)Creates a new CodeAttributeEditor.- 参数:
updateFrameSizes- specifies whether frame sizes of edited code should be updated.shrinkInstructions- specifies whether added instructions should automatically be shrunk before being written.
-
-
方法详细资料
-
reset
public void reset(int codeLength)
Resets the accumulated code changes for a given anticipated maximum code length. If necessary, the size may still be extended while editing the code, withextend(int).- 参数:
codeLength- the length of the code that will be edited next.
-
extend
public void extend(int codeLength)
Extends the size of the accumulated code changes.- 参数:
codeLength- the length of the code that will be edited next.
-
insertBeforeOffset
public void insertBeforeOffset(int instructionOffset, Instruction instruction)Remembers to place the given instruction right before the instruction at the given offset. Any branches to the existing instruction will land after the new instruction. Similarly, any try blocks that start at the existing instruction will not include the new instruction. However, any try blocks that end right before the existing instruction wil now include the new instruction.- 参数:
instructionOffset- the offset of the instruction.instruction- the new instruction.
-
insertBeforeInstruction
public void insertBeforeInstruction(int instructionOffset, Instruction instruction)Remembers to place the given instruction right before the instruction at the given offset. Any branches to the existing instruction will also go to the new instruction. Similarly, any try blocks that include the existing instruction will also include the new instruction.- 参数:
instructionOffset- the offset of the instruction.instruction- the new instruction.
-
insertBeforeOffset
public void insertBeforeOffset(int instructionOffset, Instruction[] instructions)Remembers to place the given instructions right before the instruction at the given offset. Any branches to the existing instruction will land after the new instructions. Similarly, any try blocks that start at the existing instruction will not include the new instructions. However, any try blocks that end right before the existing instruction wil now include the new instructions.- 参数:
instructionOffset- the offset of the instruction.instructions- the new instructions.
-
insertBeforeInstruction
public void insertBeforeInstruction(int instructionOffset, Instruction[] instructions)Remembers to place the given instructions right before the instruction at the given offset. Any branches to the existing instruction will also go to the new instructions. Similarly, any try blocks that include the existing instruction will also include the new instructions.- 参数:
instructionOffset- the offset of the instruction.instructions- the new instructions.
-
replaceInstruction
public void replaceInstruction(int instructionOffset, Instruction instruction)Remembers to replace the instruction at the given offset by the given instruction.- 参数:
instructionOffset- the offset of the instruction to be replaced.instruction- the new instruction.
-
replaceInstruction
public void replaceInstruction(int instructionOffset, Instruction[] instructions)Remembers to replace the instruction at the given offset by the given instructions.- 参数:
instructionOffset- the offset of the instruction to be replaced.instructions- the new instructions.
-
insertAfterInstruction
public void insertAfterInstruction(int instructionOffset, Instruction instruction)Remembers to place the given instruction right after the instruction at the given offset.- 参数:
instructionOffset- the offset of the instruction.instruction- the new instruction.
-
insertAfterInstruction
public void insertAfterInstruction(int instructionOffset, Instruction[] instructions)Remembers to place the given instructions right after the instruction at the given offset.- 参数:
instructionOffset- the offset of the instruction.instructions- the new instructions.
-
deleteInstruction
public void deleteInstruction(int instructionOffset)
Remembers to delete the instruction at the given offset.- 参数:
instructionOffset- the offset of the instruction to be deleted.
-
undeleteInstruction
public void undeleteInstruction(int instructionOffset)
Remembers not to delete the instruction at the given offset.- 参数:
instructionOffset- the offset of the instruction not to be deleted.
-
clearModifications
public void clearModifications(int instructionOffset)
Clears all modifications of the instruction at the given offset.- 参数:
instructionOffset- the offset of the instruction to be deleted.
-
isModified
public boolean isModified()
Returns whether the code has been modified in any way.
-
isModified
public boolean isModified(int instructionOffset)
Returns whether the instruction at the given offset has been modified in any way.
-
getNewOffset
public int getNewOffset(int oldOffset)
Get the new offset corresponding to the given old offset. Throws an exception if no new offset is found.
-
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
-
visitCodeAttribute0
public void visitCodeAttribute0(Clazz clazz, Method method, CodeAttribute codeAttribute)
-
visitStackMapAttribute
public void visitStackMapAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapAttribute stackMapAttribute)
- 指定者:
visitStackMapAttribute在接口中AttributeVisitor
-
visitStackMapTableAttribute
public void visitStackMapTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapTableAttribute stackMapTableAttribute)
- 指定者:
visitStackMapTableAttribute在接口中AttributeVisitor
-
visitLineNumberTableAttribute
public void visitLineNumberTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LineNumberTableAttribute lineNumberTableAttribute)
-
visitLocalVariableTableAttribute
public void visitLocalVariableTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTableAttribute localVariableTableAttribute)
-
visitLocalVariableTypeTableAttribute
public void visitLocalVariableTypeTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeTableAttribute localVariableTypeTableAttribute)
-
visitAnyTypeAnnotationsAttribute
public void visitAnyTypeAnnotationsAttribute(Clazz clazz, TypeAnnotationsAttribute typeAnnotationsAttribute)
从接口复制的说明:AttributeVisitorVisits any TypeAnnotationsAttribute instance. The more specific default implementations of this interface delegate to this method.
-
visitSimpleInstruction
public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)
- 指定者:
visitSimpleInstruction在接口中InstructionVisitor
-
visitConstantInstruction
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
- 指定者:
visitConstantInstruction在接口中InstructionVisitor
-
visitVariableInstruction
public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction)
- 指定者:
visitVariableInstruction在接口中InstructionVisitor
-
visitBranchInstruction
public void visitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction)
- 指定者:
visitBranchInstruction在接口中InstructionVisitor
-
visitTableSwitchInstruction
public void visitTableSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, TableSwitchInstruction tableSwitchInstruction)
-
visitLookUpSwitchInstruction
public void visitLookUpSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LookUpSwitchInstruction lookUpSwitchInstruction)
-
visitExceptionInfo
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo)
- 指定者:
visitExceptionInfo在接口中ExceptionInfoVisitor
-
visitAnyStackMapFrame
public void visitAnyStackMapFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, StackMapFrame stackMapFrame)
从接口复制的说明:StackMapFrameVisitorVisits any StackMapFrame instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyStackMapFrame在接口中StackMapFrameVisitor
-
visitSameOneFrame
public void visitSameOneFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameOneFrame sameOneFrame)
- 指定者:
visitSameOneFrame在接口中StackMapFrameVisitor
-
visitMoreZeroFrame
public void visitMoreZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, MoreZeroFrame moreZeroFrame)
- 指定者:
visitMoreZeroFrame在接口中StackMapFrameVisitor
-
visitFullFrame
public void visitFullFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, FullFrame fullFrame)
- 指定者:
visitFullFrame在接口中StackMapFrameVisitor
-
visitAnyVerificationType
public void visitAnyVerificationType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VerificationType verificationType)
从接口复制的说明:VerificationTypeVisitorVisits any VerificationType instance. The more specific default implementations of this interface delegate to this method.
-
visitUninitializedType
public void visitUninitializedType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, UninitializedType uninitializedType)
-
visitLineNumberInfo
public void visitLineNumberInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LineNumberInfo lineNumberInfo)
- 指定者:
visitLineNumberInfo在接口中LineNumberInfoVisitor
-
visitLocalVariableInfo
public void visitLocalVariableInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableInfo localVariableInfo)
-
visitLocalVariableTypeInfo
public void visitLocalVariableTypeInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeInfo localVariableTypeInfo)
-
visitTypeAnnotation
public void visitTypeAnnotation(Clazz clazz, TypeAnnotation typeAnnotation)
从接口复制的说明:TypeAnnotationVisitorVisits any TypeAnnotation instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitTypeAnnotation在接口中TypeAnnotationVisitor
-
visitAnyTargetInfo
public void visitAnyTargetInfo(Clazz clazz, TypeAnnotation typeAnnotation, TargetInfo targetInfo)
从接口复制的说明:TargetInfoVisitorVisits any TargetInfo instance. The more specific default implementations of this interface delegate to this method.- 指定者:
visitAnyTargetInfo在接口中TargetInfoVisitor
-
visitLocalVariableTargetInfo
public void visitLocalVariableTargetInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, LocalVariableTargetInfo localVariableTargetInfo)
-
visitOffsetTargetInfo
public void visitOffsetTargetInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, OffsetTargetInfo offsetTargetInfo)
- 指定者:
visitOffsetTargetInfo在接口中TargetInfoVisitor
-
visitLocalVariableTargetElement
public void visitLocalVariableTargetElement(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, LocalVariableTargetInfo localVariableTargetInfo, LocalVariableTargetElement localVariableTargetElement)
-
label
public CodeAttributeEditor.Label label()
Creates a new label that can be used as a pseudo-instruction to mark a local offset. Its offset can be used as a branch target in replacement instructions (CodeAttributeEditor.Label.offset()).
-
label
public CodeAttributeEditor.Label label(int identifier)
Creates a new label that can be used as a pseudo-instruction to mark a local offset. Its offset can be used as a branch target in replacement instructions (CodeAttributeEditor.Label.offset()).
-
catch_
public CodeAttributeEditor.Label catch_(int startOffset, int endOffset, int catchType)
Creates a new catch instance that can be used as a pseudo-instruction to mark the start of an exception handler. Its offset can be used as a branch target in replacement instructions (CodeAttributeEditor.Label.offset()).
-
catch_
public CodeAttributeEditor.Label catch_(int identifier, int startOffset, int endOffset, int catchType)
Creates a new catch instance that can be used as a pseudo-instruction to mark the start of an exception handler. Its offset can be used as a branch target in replacement instructions (CodeAttributeEditor.Label.offset()).
-
line
public CodeAttributeEditor.Label line(int lineNumber)
Creates a new line number instance that will insert the given line number at the current offset.
-
line
@Deprecated public CodeAttributeEditor.Label line(int lineNumber, java.lang.String source)
已过时。Creates a new line number instance that will insert the given line number at the current offset. It will insert an extended line number info with the given source if it's not null.
-
line
public CodeAttributeEditor.Label line(int lineNumber, LineNumberInfoBlock block)
Creates a new line number instance that will insert the given line number at the current offset. It will insert structured line number info belonging to the given block if it's not null.
-
-