类 Textifier
java.lang.Object
org.beetl.ow2.asm.util.Printer
org.beetl.ow2.asm.util.Textifier
A
Printer that prints a disassembled view of the classes it visits.- 作者:
- Eric Bruneton
-
字段概要
字段修饰符和类型字段说明static final intConstant used inappendDescriptorfor class signatures, formatted in default Java notation (non-bytecode)static final intConstant used inappendDescriptorfor class signatures, formatted in bytecode notationstatic final intConstant used inappendDescriptorfor field descriptors, formatted in bytecode notationstatic final intConstant used inappendDescriptorfor field signatures, formatted in bytecode notationstatic final intConstant used inappendDescriptorfor handle descriptors, formatted in bytecode notationstatic final intConstant used inappendDescriptorfor internal type names in bytecode notation.The label names.protected StringTab for labels.static final intConstant used inappendDescriptorfor method descriptors, formatted in bytecode notationstatic final intConstant used inappendDescriptorfor method signatures, formatted in bytecode notationstatic final intConstant used inappendDescriptorfor method parameter signatures, formatted in default Java notation (non-bytecode)protected StringTab for class members.protected StringTab for bytecode instructions.protected StringTab for table and lookup switch instructions.static final intConstant used inappendDescriptorfor field or method return value signatures, formatted in default Java notation (non-bytecode) -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明protected voidappendDescriptor(int type, String desc) Appends an internal className, a type descriptor or a type signature tobuf.protected voidAppends the information about the given handle tobuf.protected voidappendLabel(Label l) Appends the className of the given label tobuf.protected TextifierCreates a new TraceVisitor instance.static voidPrints a disassembled view of the given class to the standard output.voidvisit(int version, int access, String name, String signature, String superName, String[] interfaces) Class header.voidAnnotation value.visitAnnotation(String desc, boolean visible) Prints a disassembled view of the given annotation.visitAnnotation(String name, String desc) Nested annotation value.Method default annotation.voidAnnotation end.visitArray(String name) Annotation array value.voidvisitAttribute(Attribute attr) Prints a disassembled view of the given attribute.visitClassAnnotation(String desc, boolean visible) Class annotation.voidvisitClassAttribute(Attribute attr) Class attribute.voidClass end.visitClassTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) Class type annotation.voidMethod start.voidAnnotation enum value.visitField(int access, String name, String desc, String signature, Object value) Class field.visitFieldAnnotation(String desc, boolean visible) Field annotation.voidvisitFieldAttribute(Attribute attr) Field attribute.voidField end.voidvisitFieldInsn(int opcode, String owner, String name, String desc) Method instruction.visitFieldTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) Field type annotation.voidvisitFrame(int type, int nLocal, Object[] local, int nStack, Object[] stack) Method stack frame.voidvisitIincInsn(int var, int increment) Method instruction.voidvisitInnerClass(String name, String outerName, String innerName, int access) Class inner className.voidvisitInsn(int opcode) Method instruction.visitInsnAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) Instruction type annotation.voidvisitIntInsn(int opcode, int operand) Method instruction.voidvisitInvokeDynamicInsn(String name, String desc, Handle bsm, Object... bsmArgs) Method instruction.voidvisitJumpInsn(int opcode, Label label) Method instruction.voidvisitLabel(Label label) Method label.voidvisitLdcInsn(Object cst) Method instruction.voidvisitLineNumber(int line, Label start) Method debug info.voidMethod debug info.visitLocalVariableAnnotation(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String desc, boolean visible) Local variable type annotation.voidvisitLookupSwitchInsn(Label dflt, int[] keys, Label[] labels) Method instruction.voidvisitMaxs(int maxStack, int maxLocals) Method max stack and max locals.visitMethod(int access, String name, String desc, String signature, String[] exceptions) Class method.visitMethodAnnotation(String desc, boolean visible) Method annotation.voidMethod attribute.voidMethod end.voidvisitMethodInsn(int opcode, String owner, String name, String desc) 已过时。voidvisitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) Method instruction.visitMethodTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) Method type annotation.voidvisitMultiANewArrayInsn(String desc, int dims) Method instruction.voidvisitOuterClass(String owner, String name, String desc) Class outer class.voidvisitParameter(String name, int access) Method parameter.visitParameterAnnotation(int parameter, String desc, boolean visible) Method parameter annotation.voidvisitSource(String file, String debug) Class srccode.voidvisitTableSwitchInsn(int min, int max, Label dflt, Label... labels) Method instruction.visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) Try catch block type annotation.voidvisitTryCatchBlock(Label start, Label end, Label handler, String type) Method exception handler.visitTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) Prints a disassembled view of the given type annotation.voidvisitTypeInsn(int opcode, String type) Method instruction.voidvisitVarInsn(int opcode, int var) Method instruction.从类继承的方法 org.beetl.ow2.asm.util.Printer
appendString, getText, print
-
字段详细资料
-
INTERNAL_NAME
public static final int INTERNAL_NAMEConstant used inappendDescriptorfor internal type names in bytecode notation.- 另请参阅:
-
FIELD_DESCRIPTOR
public static final int FIELD_DESCRIPTORConstant used inappendDescriptorfor field descriptors, formatted in bytecode notation- 另请参阅:
-
FIELD_SIGNATURE
public static final int FIELD_SIGNATUREConstant used inappendDescriptorfor field signatures, formatted in bytecode notation- 另请参阅:
-
METHOD_DESCRIPTOR
public static final int METHOD_DESCRIPTORConstant used inappendDescriptorfor method descriptors, formatted in bytecode notation- 另请参阅:
-
METHOD_SIGNATURE
public static final int METHOD_SIGNATUREConstant used inappendDescriptorfor method signatures, formatted in bytecode notation- 另请参阅:
-
CLASS_SIGNATURE
public static final int CLASS_SIGNATUREConstant used inappendDescriptorfor class signatures, formatted in bytecode notation- 另请参阅:
-
TYPE_DECLARATION
public static final int TYPE_DECLARATIONConstant used inappendDescriptorfor field or method return value signatures, formatted in default Java notation (non-bytecode)- 另请参阅:
-
CLASS_DECLARATION
public static final int CLASS_DECLARATIONConstant used inappendDescriptorfor class signatures, formatted in default Java notation (non-bytecode)- 另请参阅:
-
PARAMETERS_DECLARATION
public static final int PARAMETERS_DECLARATIONConstant used inappendDescriptorfor method parameter signatures, formatted in default Java notation (non-bytecode)- 另请参阅:
-
HANDLE_DESCRIPTOR
public static final int HANDLE_DESCRIPTORConstant used inappendDescriptorfor handle descriptors, formatted in bytecode notation- 另请参阅:
-
tab
Tab for class members. -
tab2
Tab for bytecode instructions. -
tab3
Tab for table and lookup switch instructions. -
ltab
Tab for labels. -
labelNames
The label names. This map associate String values to Label keys.
-
-
构造器详细资料
-
Textifier
public Textifier()Constructs a newTextifier. Subclasses must not use this constructor. Instead, they must use theTextifier(int)version.- 抛出:
IllegalStateException- If a subclass calls this constructor.
-
Textifier
protected Textifier(int api) Constructs a newTextifier.- 参数:
api- the ASM API version implemented by this visitor. Must be one ofOpcodes.ASM4orOpcodes.ASM5.
-
-
方法详细资料
-
main
Prints a disassembled view of the given class to the standard output.Usage: Textifier [-debug] <binary class className or class file className >
- 参数:
args- the command line arguments.- 抛出:
Exception- if the class cannot be found, or if an IO exception occurs.
-
visit
public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) 从类复制的说明:Printer -
visitSource
从类复制的说明:PrinterClass srccode. SeeClassVisitor.visitSource(java.lang.String, java.lang.String).- 指定者:
visitSource在类中Printer
-
visitOuterClass
从类复制的说明:PrinterClass outer class. SeeClassVisitor.visitOuterClass(java.lang.String, java.lang.String, java.lang.String).- 指定者:
visitOuterClass在类中Printer
-
visitClassAnnotation
从类复制的说明:PrinterClass annotation. SeeClassVisitor.visitAnnotation(java.lang.String, boolean).- 指定者:
visitClassAnnotation在类中Printer
-
visitClassTypeAnnotation
public Printer visitClassTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) 从类复制的说明:PrinterClass type annotation. SeeClassVisitor.visitTypeAnnotation(int, org.beetl.ow2.asm.TypePath, java.lang.String, boolean).- 覆盖:
visitClassTypeAnnotation在类中Printer
-
visitClassAttribute
从类复制的说明:PrinterClass attribute. SeeClassVisitor.visitAttribute(org.beetl.ow2.asm.Attribute).- 指定者:
visitClassAttribute在类中Printer
-
visitInnerClass
从类复制的说明:PrinterClass inner className. SeeClassVisitor.visitInnerClass(java.lang.String, java.lang.String, java.lang.String, int).- 指定者:
visitInnerClass在类中Printer
-
visitField
从类复制的说明:PrinterClass field. SeeClassVisitor.visitField(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object).- 指定者:
visitField在类中Printer
-
visitMethod
public Textifier visitMethod(int access, String name, String desc, String signature, String[] exceptions) 从类复制的说明:PrinterClass method. SeeClassVisitor.visitMethod(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[]).- 指定者:
visitMethod在类中Printer
-
visitClassEnd
public void visitClassEnd()从类复制的说明:PrinterClass end. SeeClassVisitor.visitEnd().- 指定者:
visitClassEnd在类中Printer
-
visit
从类复制的说明:PrinterAnnotation value. SeeAnnotationVisitor.visit(java.lang.String, java.lang.Object). -
visitEnum
从类复制的说明:PrinterAnnotation enum value. SeeAnnotationVisitor.visitEnum(java.lang.String, java.lang.String, java.lang.String). -
visitAnnotation
从类复制的说明:PrinterNested annotation value. SeeAnnotationVisitor.visitAnnotation(java.lang.String, java.lang.String).- 指定者:
visitAnnotation在类中Printer
-
visitArray
从类复制的说明:PrinterAnnotation array value. SeeAnnotationVisitor.visitArray(java.lang.String).- 指定者:
visitArray在类中Printer
-
visitAnnotationEnd
public void visitAnnotationEnd()从类复制的说明:PrinterAnnotation end. SeeAnnotationVisitor.visitEnd().- 指定者:
visitAnnotationEnd在类中Printer
-
visitFieldAnnotation
从类复制的说明:PrinterField annotation. SeeFieldVisitor.visitAnnotation(java.lang.String, boolean).- 指定者:
visitFieldAnnotation在类中Printer
-
visitFieldTypeAnnotation
public Printer visitFieldTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) 从类复制的说明:PrinterField type annotation. SeeFieldVisitor.visitTypeAnnotation(int, org.beetl.ow2.asm.TypePath, java.lang.String, boolean).- 覆盖:
visitFieldTypeAnnotation在类中Printer
-
visitFieldAttribute
从类复制的说明:PrinterField attribute. SeeFieldVisitor.visitAttribute(org.beetl.ow2.asm.Attribute).- 指定者:
visitFieldAttribute在类中Printer
-
visitFieldEnd
public void visitFieldEnd()从类复制的说明:PrinterField end. SeeFieldVisitor.visitEnd().- 指定者:
visitFieldEnd在类中Printer
-
visitParameter
从类复制的说明:PrinterMethod parameter. SeeMethodVisitor.visitParameter(String, int).- 覆盖:
visitParameter在类中Printer
-
visitAnnotationDefault
从类复制的说明:PrinterMethod default annotation. SeeMethodVisitor.visitAnnotationDefault().- 指定者:
visitAnnotationDefault在类中Printer
-
visitMethodAnnotation
从类复制的说明:PrinterMethod annotation. SeeMethodVisitor.visitAnnotation(java.lang.String, boolean).- 指定者:
visitMethodAnnotation在类中Printer
-
visitMethodTypeAnnotation
public Printer visitMethodTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) 从类复制的说明:PrinterMethod type annotation. SeeMethodVisitor.visitTypeAnnotation(int, org.beetl.ow2.asm.TypePath, java.lang.String, boolean).- 覆盖:
visitMethodTypeAnnotation在类中Printer
-
visitParameterAnnotation
从类复制的说明:PrinterMethod parameter annotation. SeeMethodVisitor.visitParameterAnnotation(int, java.lang.String, boolean).- 指定者:
visitParameterAnnotation在类中Printer
-
visitMethodAttribute
从类复制的说明:PrinterMethod attribute. SeeMethodVisitor.visitAttribute(org.beetl.ow2.asm.Attribute).- 指定者:
visitMethodAttribute在类中Printer
-
visitCode
public void visitCode()从类复制的说明:PrinterMethod start. SeeMethodVisitor.visitCode(). -
visitFrame
从类复制的说明:PrinterMethod stack frame. SeeMethodVisitor.visitFrame(int, int, java.lang.Object[], int, java.lang.Object[]).- 指定者:
visitFrame在类中Printer
-
visitInsn
public void visitInsn(int opcode) 从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitInsn(int). -
visitIntInsn
public void visitIntInsn(int opcode, int operand) 从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitIntInsn(int, int).- 指定者:
visitIntInsn在类中Printer
-
visitVarInsn
public void visitVarInsn(int opcode, int var) 从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitVarInsn(int, int).- 指定者:
visitVarInsn在类中Printer
-
visitTypeInsn
从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitTypeInsn(int, java.lang.String).- 指定者:
visitTypeInsn在类中Printer
-
visitFieldInsn
从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitFieldInsn(int, java.lang.String, java.lang.String, java.lang.String).- 指定者:
visitFieldInsn在类中Printer
-
visitMethodInsn
已过时。从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitMethodInsn(int, java.lang.String, java.lang.String, java.lang.String).- 覆盖:
visitMethodInsn在类中Printer
-
visitMethodInsn
从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitMethodInsn(int, java.lang.String, java.lang.String, java.lang.String).- 覆盖:
visitMethodInsn在类中Printer
-
visitInvokeDynamicInsn
从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitInvokeDynamicInsn(java.lang.String, java.lang.String, org.beetl.ow2.asm.Handle, java.lang.Object...).- 指定者:
visitInvokeDynamicInsn在类中Printer
-
visitJumpInsn
从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitJumpInsn(int, org.beetl.ow2.asm.Label).- 指定者:
visitJumpInsn在类中Printer
-
visitLabel
从类复制的说明:PrinterMethod label. SeeMethodVisitor.visitLabel(org.beetl.ow2.asm.Label).- 指定者:
visitLabel在类中Printer
-
visitLdcInsn
从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitLdcInsn(java.lang.Object).- 指定者:
visitLdcInsn在类中Printer
-
visitIincInsn
public void visitIincInsn(int var, int increment) 从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitIincInsn(int, int).- 指定者:
visitIincInsn在类中Printer
-
visitTableSwitchInsn
从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitTableSwitchInsn(int, int, org.beetl.ow2.asm.Label, org.beetl.ow2.asm.Label...).- 指定者:
visitTableSwitchInsn在类中Printer
-
visitLookupSwitchInsn
从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitLookupSwitchInsn(org.beetl.ow2.asm.Label, int[], org.beetl.ow2.asm.Label[]).- 指定者:
visitLookupSwitchInsn在类中Printer
-
visitMultiANewArrayInsn
从类复制的说明:PrinterMethod instruction. SeeMethodVisitor.visitMultiANewArrayInsn(java.lang.String, int).- 指定者:
visitMultiANewArrayInsn在类中Printer
-
visitInsnAnnotation
从类复制的说明:PrinterInstruction type annotation. SeeMethodVisitor.visitInsnAnnotation(int, org.beetl.ow2.asm.TypePath, java.lang.String, boolean).- 覆盖:
visitInsnAnnotation在类中Printer
-
visitTryCatchBlock
从类复制的说明:PrinterMethod exception handler. SeeMethodVisitor.visitTryCatchBlock(org.beetl.ow2.asm.Label, org.beetl.ow2.asm.Label, org.beetl.ow2.asm.Label, java.lang.String).- 指定者:
visitTryCatchBlock在类中Printer
-
visitTryCatchAnnotation
public Printer visitTryCatchAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) 从类复制的说明:PrinterTry catch block type annotation. SeeMethodVisitor.visitTryCatchAnnotation(int, org.beetl.ow2.asm.TypePath, java.lang.String, boolean).- 覆盖:
visitTryCatchAnnotation在类中Printer
-
visitLocalVariable
public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) 从类复制的说明:PrinterMethod debug info. SeeMethodVisitor.visitLocalVariable(java.lang.String, java.lang.String, java.lang.String, org.beetl.ow2.asm.Label, org.beetl.ow2.asm.Label, int).- 指定者:
visitLocalVariable在类中Printer
-
visitLocalVariableAnnotation
public Printer visitLocalVariableAnnotation(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String desc, boolean visible) 从类复制的说明:PrinterLocal variable type annotation. SeeMethodVisitor.visitTryCatchAnnotation(int, org.beetl.ow2.asm.TypePath, java.lang.String, boolean).- 覆盖:
visitLocalVariableAnnotation在类中Printer
-
visitLineNumber
从类复制的说明:PrinterMethod debug info. SeeMethodVisitor.visitLineNumber(int, org.beetl.ow2.asm.Label).- 指定者:
visitLineNumber在类中Printer
-
visitMaxs
public void visitMaxs(int maxStack, int maxLocals) 从类复制的说明:PrinterMethod max stack and max locals. SeeMethodVisitor.visitMaxs(int, int). -
visitMethodEnd
public void visitMethodEnd()从类复制的说明:PrinterMethod end. SeeMethodVisitor.visitEnd().- 指定者:
visitMethodEnd在类中Printer
-
visitAnnotation
Prints a disassembled view of the given annotation.- 参数:
desc- the class descriptor of the annotation class.visible- true if the annotation is visible at runtime.- 返回:
- a visitor to visit the annotation values.
-
visitTypeAnnotation
Prints a disassembled view of the given type annotation.- 参数:
typeRef- a reference to the annotated type. SeeTypeReference.typePath- the path to the annotated type argument, wildcard bound, array element type, or static inner type within 'typeRef'. May be null if the annotation targets 'typeRef' as a whole.desc- the class descriptor of the annotation class.visible- true if the annotation is visible at runtime.- 返回:
- a visitor to visit the annotation values.
-
visitAttribute
Prints a disassembled view of the given attribute.- 参数:
attr- an attribute.
-
createTextifier
Creates a new TraceVisitor instance.- 返回:
- a new TraceVisitor.
-
appendDescriptor
Appends an internal className, a type descriptor or a type signature tobuf.- 参数:
type- indicates if desc is an internal className, a field descriptor, a method descriptor, a class signature, ...desc- an internal className, type descriptor, or type signature. May be null.
-
appendLabel
Appends the className of the given label tobuf. Creates a new label className if the given label does not yet have one.- 参数:
l- a label.
-
appendHandle
Appends the information about the given handle tobuf.- 参数:
h- a handle, non null.
-