Modifier and Type | Field and Description |
---|---|
protected int |
api
The ASM API version implemented by this class.
|
protected StringBuffer |
buf
A buffer that can be used to create strings.
|
static String[] |
HANDLE_TAG
The names of the
tag field values for
Handle . |
static String[] |
OPCODES
The names of the Java Virtual Machine opcodes.
|
List<Object> |
text
The text to be printed.
|
static String[] |
TYPES
The names of the for
operand parameter values of the
MethodVisitor.visitIntInsn(int, int) method when
opcode is NEWARRAY . |
Modifier | Constructor and Description |
---|---|
protected |
Printer(int api)
Constructs a new
Printer . |
Modifier and Type | Method and Description |
---|---|
static void |
appendString(StringBuffer buf,
String s)
Appends a quoted string to a given buffer.
|
List<Object> |
getText()
Returns the text constructed by this visitor.
|
void |
print(PrintWriter pw)
Prints the text constructed by this visitor.
|
abstract void |
visit(int version,
int access,
String name,
String signature,
String superName,
String[] interfaces)
Class header.
|
abstract void |
visit(String name,
Object value)
Annotation value.
|
abstract Printer |
visitAnnotation(String name,
String desc)
Nested annotation value.
|
abstract Printer |
visitAnnotationDefault()
Method default annotation.
|
abstract void |
visitAnnotationEnd()
Annotation end.
|
abstract Printer |
visitArray(String name)
Annotation array value.
|
abstract Printer |
visitClassAnnotation(String desc,
boolean visible)
Class annotation.
|
abstract void |
visitClassAttribute(Attribute attr)
Class attribute.
|
abstract void |
visitClassEnd()
Class end.
|
abstract void |
visitCode()
Method start.
|
abstract void |
visitEnum(String name,
String desc,
String value)
Annotation enum value.
|
abstract Printer |
visitField(int access,
String name,
String desc,
String signature,
Object value)
Class field.
|
abstract Printer |
visitFieldAnnotation(String desc,
boolean visible)
Field annotation.
|
abstract void |
visitFieldAttribute(Attribute attr)
Field attribute.
|
abstract void |
visitFieldEnd()
Field end.
|
abstract void |
visitFieldInsn(int opcode,
String owner,
String name,
String desc)
Method instruction.
|
abstract void |
visitFrame(int type,
int nLocal,
Object[] local,
int nStack,
Object[] stack)
Method stack frame.
|
abstract void |
visitIincInsn(int var,
int increment)
Method instruction.
|
abstract void |
visitInnerClass(String name,
String outerName,
String innerName,
int access)
Class inner name.
|
abstract void |
visitInsn(int opcode)
Method instruction.
|
abstract void |
visitIntInsn(int opcode,
int operand)
Method instruction.
|
abstract void |
visitInvokeDynamicInsn(String name,
String desc,
Handle bsm,
Object... bsmArgs)
Method instruction.
|
abstract void |
visitJumpInsn(int opcode,
Label label)
Method instruction.
|
abstract void |
visitLabel(Label label)
Method label.
|
abstract void |
visitLdcInsn(Object cst)
Method instruction.
|
abstract void |
visitLineNumber(int line,
Label start)
Method debug info.
|
abstract void |
visitLocalVariable(String name,
String desc,
String signature,
Label start,
Label end,
int index)
Method debug info.
|
abstract void |
visitLookupSwitchInsn(Label dflt,
int[] keys,
Label[] labels)
Method instruction.
|
abstract void |
visitMaxs(int maxStack,
int maxLocals)
Method max stack and max locals.
|
abstract Printer |
visitMethod(int access,
String name,
String desc,
String signature,
String[] exceptions)
Class method.
|
abstract Printer |
visitMethodAnnotation(String desc,
boolean visible)
Method annotation.
|
abstract void |
visitMethodAttribute(Attribute attr)
Method attribute.
|
abstract void |
visitMethodEnd()
Method end.
|
abstract void |
visitMethodInsn(int opcode,
String owner,
String name,
String desc)
Method instruction.
|
abstract void |
visitMultiANewArrayInsn(String desc,
int dims)
Method instruction.
|
abstract void |
visitOuterClass(String owner,
String name,
String desc)
Class outer class.
|
abstract Printer |
visitParameterAnnotation(int parameter,
String desc,
boolean visible)
Method parameter annotation.
|
abstract void |
visitSource(String file,
String debug)
Class source.
|
abstract void |
visitTableSwitchInsn(int min,
int max,
Label dflt,
Label... labels)
Method instruction.
|
abstract void |
visitTryCatchBlock(Label start,
Label end,
Label handler,
String type)
Method exception handler.
|
abstract void |
visitTypeInsn(int opcode,
String type)
Method instruction.
|
abstract void |
visitVarInsn(int opcode,
int var)
Method instruction.
|
public static final String[] OPCODES
public static final String[] TYPES
operand
parameter values of the
MethodVisitor.visitIntInsn(int, int)
method when
opcode
is NEWARRAY
.protected final int api
Opcodes.ASM4
.protected final StringBuffer buf
public final List<Object> text
protected Printer(int api)
Printer
.public abstract void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
public abstract void visitSource(String file, String debug)
ClassVisitor.visitSource(java.lang.String, java.lang.String)
.public abstract void visitOuterClass(String owner, String name, String desc)
ClassVisitor.visitOuterClass(java.lang.String, java.lang.String, java.lang.String)
.public abstract Printer visitClassAnnotation(String desc, boolean visible)
ClassVisitor.visitAnnotation(java.lang.String, boolean)
.public abstract void visitClassAttribute(Attribute attr)
ClassVisitor.visitAttribute(com.google.gwt.dev.asm.Attribute)
.public abstract void visitInnerClass(String name, String outerName, String innerName, int access)
ClassVisitor.visitInnerClass(java.lang.String, java.lang.String, java.lang.String, int)
.public abstract Printer visitField(int access, String name, String desc, String signature, Object value)
public abstract Printer visitMethod(int access, String name, String desc, String signature, String[] exceptions)
public abstract void visitClassEnd()
ClassVisitor.visitEnd()
.public abstract void visit(String name, Object value)
AnnotationVisitor.visit(java.lang.String, java.lang.Object)
.public abstract void visitEnum(String name, String desc, String value)
AnnotationVisitor.visitEnum(java.lang.String, java.lang.String, java.lang.String)
.public abstract Printer visitAnnotation(String name, String desc)
AnnotationVisitor.visitAnnotation(java.lang.String, java.lang.String)
.public abstract Printer visitArray(String name)
AnnotationVisitor.visitArray(java.lang.String)
.public abstract void visitAnnotationEnd()
AnnotationVisitor.visitEnd()
.public abstract Printer visitFieldAnnotation(String desc, boolean visible)
FieldVisitor.visitAnnotation(java.lang.String, boolean)
.public abstract void visitFieldAttribute(Attribute attr)
FieldVisitor.visitAttribute(com.google.gwt.dev.asm.Attribute)
.public abstract void visitFieldEnd()
FieldVisitor.visitEnd()
.public abstract Printer visitAnnotationDefault()
MethodVisitor.visitAnnotationDefault()
.public abstract Printer visitMethodAnnotation(String desc, boolean visible)
MethodVisitor.visitAnnotation(java.lang.String, boolean)
.public abstract Printer visitParameterAnnotation(int parameter, String desc, boolean visible)
MethodVisitor.visitParameterAnnotation(int, java.lang.String, boolean)
.public abstract void visitMethodAttribute(Attribute attr)
MethodVisitor.visitAttribute(com.google.gwt.dev.asm.Attribute)
.public abstract void visitCode()
MethodVisitor.visitCode()
.public abstract void visitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack)
MethodVisitor.visitFrame(int, int, java.lang.Object[], int, java.lang.Object[])
.public abstract void visitInsn(int opcode)
MethodVisitor.visitInsn(int)
.public abstract void visitIntInsn(int opcode, int operand)
MethodVisitor.visitIntInsn(int, int)
.public abstract void visitVarInsn(int opcode, int var)
MethodVisitor.visitVarInsn(int, int)
.public abstract void visitTypeInsn(int opcode, String type)
MethodVisitor.visitTypeInsn(int, java.lang.String)
.public abstract void visitFieldInsn(int opcode, String owner, String name, String desc)
MethodVisitor.visitFieldInsn(int, java.lang.String, java.lang.String, java.lang.String)
.public abstract void visitMethodInsn(int opcode, String owner, String name, String desc)
MethodVisitor.visitMethodInsn(int, java.lang.String, java.lang.String, java.lang.String)
.public abstract void visitInvokeDynamicInsn(String name, String desc, Handle bsm, Object... bsmArgs)
public abstract void visitJumpInsn(int opcode, Label label)
MethodVisitor.visitJumpInsn(int, com.google.gwt.dev.asm.Label)
.public abstract void visitLabel(Label label)
MethodVisitor.visitLabel(com.google.gwt.dev.asm.Label)
.public abstract void visitLdcInsn(Object cst)
MethodVisitor.visitLdcInsn(java.lang.Object)
.public abstract void visitIincInsn(int var, int increment)
MethodVisitor.visitIincInsn(int, int)
.public abstract void visitTableSwitchInsn(int min, int max, Label dflt, Label... labels)
public abstract void visitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels)
public abstract void visitMultiANewArrayInsn(String desc, int dims)
MethodVisitor.visitMultiANewArrayInsn(java.lang.String, int)
.public abstract void visitTryCatchBlock(Label start, Label end, Label handler, String type)
public abstract void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index)
public abstract void visitLineNumber(int line, Label start)
MethodVisitor.visitLineNumber(int, com.google.gwt.dev.asm.Label)
.public abstract void visitMaxs(int maxStack, int maxLocals)
MethodVisitor.visitMaxs(int, int)
.public abstract void visitMethodEnd()
MethodVisitor.visitEnd()
.public List<Object> getText()
public void print(PrintWriter pw)
pw
- the print writer to be used.public static void appendString(StringBuffer buf, String s)
buf
- the buffer where the string must be added.s
- the string to be added.Copyright © 2018. All rights reserved.