public class MethodOptimizer extends RemappingMethodAdapter
MethodAdapter that renames fields and methods, and removes debug
info.remapperfirstLocal, nextLocalmv| Constructor and Description |
|---|
MethodOptimizer(int access,
String desc,
MethodVisitor mv,
Remapper remapper) |
| Modifier and Type | Method and Description |
|---|---|
AnnotationVisitor |
visitAnnotationDefault()
Visits the default value of this annotation interface method.
|
void |
visitAttribute(Attribute attr)
Visits a non standard attribute of this method.
|
void |
visitFrame(int type,
int local,
Object[] local2,
int stack,
Object[] stack2)
Visits the current state of the local variables and operand stack
elements.
|
void |
visitLineNumber(int line,
Label start)
Visits a line number declaration.
|
void |
visitLocalVariable(String name,
String desc,
String signature,
Label start,
Label end,
int index)
Visits a local variable declaration.
|
AnnotationVisitor |
visitParameterAnnotation(int parameter,
String desc,
boolean visible)
Visits an annotation of a parameter this method.
|
visitAnnotation, visitFieldInsn, visitLdcInsn, visitMethodInsn, visitMultiANewArrayInsn, visitTryCatchBlock, visitTypeInsnnewLocal, newLocalMapping, setLocalType, visitIincInsn, visitMaxs, visitVarInsnvisitCode, visitEnd, visitInsn, visitIntInsn, visitJumpInsn, visitLabel, visitLookupSwitchInsn, visitTableSwitchInsnpublic MethodOptimizer(int access,
String desc,
MethodVisitor mv,
Remapper remapper)
public AnnotationVisitor visitAnnotationDefault()
MethodVisitorvisitAnnotationDefault in interface MethodVisitorvisitAnnotationDefault in class RemappingMethodAdapterpublic AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible)
MethodVisitorvisitParameterAnnotation in interface MethodVisitorvisitParameterAnnotation in class RemappingMethodAdapterparameter - the parameter index.desc - the class descriptor of the annotation class.visible - true if the annotation is visible at runtime.public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index)
MethodVisitorvisitLocalVariable in interface MethodVisitorvisitLocalVariable in class RemappingMethodAdaptername - the name of a local variable.desc - the type descriptor of this local variable.signature - the type signature of this local variable. May be
null if the local variable type does not use generic
types.start - the first instruction corresponding to the scope of this
local variable (inclusive).end - the last instruction corresponding to the scope of this local
variable (exclusive).index - the local variable's index.public void visitLineNumber(int line,
Label start)
MethodVisitorvisitLineNumber in interface MethodVisitorvisitLineNumber in class MethodAdapterline - a line number. This number refers to the source file from
which the class was compiled.start - the first instruction corresponding to this line number.public void visitFrame(int type,
int local,
Object[] local2,
int stack,
Object[] stack2)
MethodVisitorV1_6. Opcodes.F_SAME representing frame with exactly the same
locals as the previous frame and with the empty stack.Opcodes.F_SAME1
representing frame with exactly the same locals as the previous frame and
with single value on the stack (nStack is 1 and
stack[0] contains value for the type of the stack item).Opcodes.F_APPEND representing frame with current locals are
the same as the locals in the previous frame, except that additional
locals are defined (nLocal is 1, 2 or 3 and
local elements contains values representing added types).Opcodes.F_CHOP representing frame with current locals are
the same as the locals in the previous frame, except that the last 1-3
locals are absent and with the empty stack (nLocals is 1,
2 or 3). Opcodes.F_FULL representing complete frame
data.visitFrame in interface MethodVisitorvisitFrame in class RemappingMethodAdaptertype - the type of this stack map frame. Must be
Opcodes.F_NEW for expanded frames, or
Opcodes.F_FULL, Opcodes.F_APPEND,
Opcodes.F_CHOP, Opcodes.F_SAME or
Opcodes.F_APPEND, Opcodes.F_SAME1 for compressed
frames.local - the number of local variables in the visited frame.local2 - the local variable types in this frame. This array must not
be modified. Primitive types are represented by
Opcodes.TOP, Opcodes.INTEGER,
Opcodes.FLOAT, Opcodes.LONG,
Opcodes.DOUBLE,Opcodes.NULL or
Opcodes.UNINITIALIZED_THIS (long and double are
represented by a single element). Reference types are represented
by String objects (representing internal names), and uninitialized
types by Label objects (this label designates the NEW instruction
that created this uninitialized value).stack - the number of operand stack elements in the visited frame.stack2 - the operand stack types in this frame. This array must not
be modified. Its content has the same format as the "local" array.public void visitAttribute(Attribute attr)
MethodVisitorvisitAttribute in interface MethodVisitorvisitAttribute in class MethodAdapterattr - an attribute.Copyright © 2011-2018 Eclipse Foundation. All Rights Reserved.