public class ClassPrinter extends java.lang.Object implements ClassVisitor, ConstantVisitor, MemberVisitor, AttributeVisitor, BootstrapMethodInfoVisitor, RecordComponentInfoVisitor, InnerClassesInfoVisitor, ExceptionInfoVisitor, StackMapFrameVisitor, VerificationTypeVisitor, LineNumberInfoVisitor, ParameterInfoVisitor, LocalVariableInfoVisitor, LocalVariableTypeInfoVisitor, RequiresInfoVisitor, ExportsInfoVisitor, OpensInfoVisitor, ProvidesInfoVisitor, AnnotationVisitor, TypeAnnotationVisitor, TargetInfoVisitor, LocalVariableTargetElementVisitor, TypePathInfoVisitor, ElementValueVisitor, InstructionVisitor
ClassVisitor
prints out the complete internal structure of the classes it visits.Constructor and Description |
---|
ClassPrinter()
Creates a new ClassPrinter that prints to the standard output.
|
ClassPrinter(java.io.PrintWriter printWriter)
Creates a new ClassPrinter that prints to the given writer.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitAnyConstant, visitAnyMethodrefConstant, visitAnyRefConstant
visitAnyMember, visitLibraryMember, visitProgramMember
visitAnyAnnotationsAttribute, visitAnyAttribute, visitAnyParameterAnnotationsAttribute, visitAnyTypeAnnotationsAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute
visitAnyStackMapFrame
visitAnyVerificationType, visitStackDoubleType, visitStackFloatType, visitStackIntegerType, visitStackLongType, visitStackNullType, visitStackObjectType, visitStackTopType, visitStackUninitializedThisType, visitStackUninitializedType, visitVariablesDoubleType, visitVariablesFloatType, visitVariablesIntegerType, visitVariablesLongType, visitVariablesNullType, visitVariablesObjectType, visitVariablesTopType, visitVariablesUninitializedThisType, visitVariablesUninitializedType
visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation
visitTypeAnnotation, visitTypeAnnotation, visitTypeAnnotation, visitTypeAnnotation, visitTypeAnnotation
visitAnyTargetInfo, visitEmptyTargetInfo, visitEmptyTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterBoundTargetInfo, visitTypeParameterTargetInfo
visitTypePathInfo, visitTypePathInfo, visitTypePathInfo, visitTypePathInfo
visitAnyElementValue
visitAnySwitchInstruction, visitBranchInstruction, visitSimpleInstruction, visitVariableInstruction
public ClassPrinter()
public ClassPrinter(java.io.PrintWriter printWriter)
public void visitAnyClass(Clazz clazz)
ClassVisitor
visitAnyClass
in interface ClassVisitor
public void visitProgramClass(ProgramClass programClass)
visitProgramClass
in interface ClassVisitor
public void visitLibraryClass(LibraryClass libraryClass)
visitLibraryClass
in interface ClassVisitor
public void visitIntegerConstant(Clazz clazz, IntegerConstant integerConstant)
visitIntegerConstant
in interface ConstantVisitor
public void visitLongConstant(Clazz clazz, LongConstant longConstant)
visitLongConstant
in interface ConstantVisitor
public void visitFloatConstant(Clazz clazz, FloatConstant floatConstant)
visitFloatConstant
in interface ConstantVisitor
public void visitDoubleConstant(Clazz clazz, DoubleConstant doubleConstant)
visitDoubleConstant
in interface ConstantVisitor
public void visitPrimitiveArrayConstant(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant)
visitPrimitiveArrayConstant
in interface ConstantVisitor
public void visitStringConstant(Clazz clazz, StringConstant stringConstant)
visitStringConstant
in interface ConstantVisitor
public void visitUtf8Constant(Clazz clazz, Utf8Constant utf8Constant)
visitUtf8Constant
in interface ConstantVisitor
public void visitDynamicConstant(Clazz clazz, DynamicConstant dynamicConstant)
visitDynamicConstant
in interface ConstantVisitor
public void visitInvokeDynamicConstant(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant)
visitInvokeDynamicConstant
in interface ConstantVisitor
public void visitMethodHandleConstant(Clazz clazz, MethodHandleConstant methodHandleConstant)
visitMethodHandleConstant
in interface ConstantVisitor
public void visitModuleConstant(Clazz clazz, ModuleConstant moduleConstant)
visitModuleConstant
in interface ConstantVisitor
public void visitPackageConstant(Clazz clazz, PackageConstant packageConstant)
visitPackageConstant
in interface ConstantVisitor
public void visitFieldrefConstant(Clazz clazz, FieldrefConstant fieldrefConstant)
visitFieldrefConstant
in interface ConstantVisitor
public void visitInterfaceMethodrefConstant(Clazz clazz, InterfaceMethodrefConstant interfaceMethodrefConstant)
visitInterfaceMethodrefConstant
in interface ConstantVisitor
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant)
visitMethodrefConstant
in interface ConstantVisitor
public void visitClassConstant(Clazz clazz, ClassConstant classConstant)
visitClassConstant
in interface ConstantVisitor
public void visitMethodTypeConstant(Clazz clazz, MethodTypeConstant methodTypeConstant)
visitMethodTypeConstant
in interface ConstantVisitor
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant)
visitNameAndTypeConstant
in interface ConstantVisitor
public void visitProgramField(ProgramClass programClass, ProgramField programField)
visitProgramField
in interface MemberVisitor
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
visitProgramMethod
in interface MemberVisitor
public void visitLibraryField(LibraryClass libraryClass, LibraryField libraryField)
visitLibraryField
in interface MemberVisitor
public void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
visitLibraryMethod
in interface MemberVisitor
public void visitUnknownAttribute(Clazz clazz, UnknownAttribute unknownAttribute)
visitUnknownAttribute
in interface AttributeVisitor
public void visitBootstrapMethodsAttribute(Clazz clazz, BootstrapMethodsAttribute bootstrapMethodsAttribute)
visitBootstrapMethodsAttribute
in interface AttributeVisitor
public void visitSourceFileAttribute(Clazz clazz, SourceFileAttribute sourceFileAttribute)
visitSourceFileAttribute
in interface AttributeVisitor
public void visitSourceDirAttribute(Clazz clazz, SourceDirAttribute sourceDirAttribute)
visitSourceDirAttribute
in interface AttributeVisitor
public void visitSourceDebugExtensionAttribute(Clazz clazz, SourceDebugExtensionAttribute sourceDebugExtensionAttribute)
visitSourceDebugExtensionAttribute
in interface AttributeVisitor
public void visitRecordAttribute(Clazz clazz, RecordAttribute recordAttributeAttribute)
visitRecordAttribute
in interface AttributeVisitor
public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute)
visitInnerClassesAttribute
in interface AttributeVisitor
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute)
visitEnclosingMethodAttribute
in interface AttributeVisitor
public void visitNestHostAttribute(Clazz clazz, NestHostAttribute nestHostAttribute)
visitNestHostAttribute
in interface AttributeVisitor
public void visitNestMembersAttribute(Clazz clazz, NestMembersAttribute nestMembersAttribute)
visitNestMembersAttribute
in interface AttributeVisitor
public void visitPermittedSubclassesAttribute(Clazz clazz, PermittedSubclassesAttribute permittedSubclassesAttribute)
visitPermittedSubclassesAttribute
in interface AttributeVisitor
public void visitModuleAttribute(Clazz clazz, ModuleAttribute moduleAttribute)
visitModuleAttribute
in interface AttributeVisitor
public void visitModuleMainClassAttribute(Clazz clazz, ModuleMainClassAttribute moduleMainClassAttribute)
visitModuleMainClassAttribute
in interface AttributeVisitor
public void visitModulePackagesAttribute(Clazz clazz, ModulePackagesAttribute modulePackagesAttribute)
visitModulePackagesAttribute
in interface AttributeVisitor
public void visitDeprecatedAttribute(Clazz clazz, DeprecatedAttribute deprecatedAttribute)
visitDeprecatedAttribute
in interface AttributeVisitor
public void visitSyntheticAttribute(Clazz clazz, SyntheticAttribute syntheticAttribute)
visitSyntheticAttribute
in interface AttributeVisitor
public void visitSignatureAttribute(Clazz clazz, SignatureAttribute signatureAttribute)
visitSignatureAttribute
in interface AttributeVisitor
public void visitConstantValueAttribute(Clazz clazz, Field field, ConstantValueAttribute constantValueAttribute)
visitConstantValueAttribute
in interface AttributeVisitor
public void visitMethodParametersAttribute(Clazz clazz, Method method, MethodParametersAttribute methodParametersAttribute)
visitMethodParametersAttribute
in interface AttributeVisitor
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
visitExceptionsAttribute
in interface AttributeVisitor
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
visitCodeAttribute
in interface AttributeVisitor
public void visitStackMapAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapAttribute stackMapAttribute)
visitStackMapAttribute
in interface AttributeVisitor
public void visitStackMapTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapTableAttribute stackMapTableAttribute)
visitStackMapTableAttribute
in interface AttributeVisitor
public void visitLineNumberTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LineNumberTableAttribute lineNumberTableAttribute)
visitLineNumberTableAttribute
in interface AttributeVisitor
public void visitLocalVariableTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTableAttribute localVariableTableAttribute)
visitLocalVariableTableAttribute
in interface AttributeVisitor
public void visitLocalVariableTypeTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeTableAttribute localVariableTypeTableAttribute)
visitLocalVariableTypeTableAttribute
in interface AttributeVisitor
public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
visitRuntimeVisibleAnnotationsAttribute
in interface AttributeVisitor
public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
visitRuntimeInvisibleAnnotationsAttribute
in interface AttributeVisitor
public void visitRuntimeVisibleParameterAnnotationsAttribute(Clazz clazz, Method method, RuntimeVisibleParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute)
visitRuntimeVisibleParameterAnnotationsAttribute
in interface AttributeVisitor
public void visitRuntimeInvisibleParameterAnnotationsAttribute(Clazz clazz, Method method, RuntimeInvisibleParameterAnnotationsAttribute runtimeInvisibleParameterAnnotationsAttribute)
visitRuntimeInvisibleParameterAnnotationsAttribute
in interface AttributeVisitor
public void visitRuntimeVisibleTypeAnnotationsAttribute(Clazz clazz, RuntimeVisibleTypeAnnotationsAttribute runtimeVisibleTypeAnnotationsAttribute)
visitRuntimeVisibleTypeAnnotationsAttribute
in interface AttributeVisitor
public void visitRuntimeInvisibleTypeAnnotationsAttribute(Clazz clazz, RuntimeInvisibleTypeAnnotationsAttribute runtimeInvisibleTypeAnnotationsAttribute)
visitRuntimeInvisibleTypeAnnotationsAttribute
in interface AttributeVisitor
public void visitAnnotationDefaultAttribute(Clazz clazz, Method method, AnnotationDefaultAttribute annotationDefaultAttribute)
visitAnnotationDefaultAttribute
in interface AttributeVisitor
public void visitBootstrapMethodInfo(Clazz clazz, BootstrapMethodInfo bootstrapMethodInfo)
visitBootstrapMethodInfo
in interface BootstrapMethodInfoVisitor
public void visitRecordComponentInfo(Clazz clazz, RecordComponentInfo recordComponentInfo)
visitRecordComponentInfo
in interface RecordComponentInfoVisitor
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo)
visitInnerClassesInfo
in interface InnerClassesInfoVisitor
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)
InstructionVisitor
visitAnyInstruction
in interface InstructionVisitor
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
visitConstantInstruction
in interface InstructionVisitor
public void visitTableSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, TableSwitchInstruction tableSwitchInstruction)
visitTableSwitchInstruction
in interface InstructionVisitor
public void visitLookUpSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LookUpSwitchInstruction lookUpSwitchInstruction)
visitLookUpSwitchInstruction
in interface InstructionVisitor
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo)
visitExceptionInfo
in interface ExceptionInfoVisitor
public void visitSameZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameZeroFrame sameZeroFrame)
visitSameZeroFrame
in interface StackMapFrameVisitor
public void visitSameOneFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameOneFrame sameOneFrame)
visitSameOneFrame
in interface StackMapFrameVisitor
public void visitLessZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LessZeroFrame lessZeroFrame)
visitLessZeroFrame
in interface StackMapFrameVisitor
public void visitMoreZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, MoreZeroFrame moreZeroFrame)
visitMoreZeroFrame
in interface StackMapFrameVisitor
public void visitFullFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, FullFrame fullFrame)
visitFullFrame
in interface StackMapFrameVisitor
public void visitIntegerType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, IntegerType integerType)
visitIntegerType
in interface VerificationTypeVisitor
public void visitFloatType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, FloatType floatType)
visitFloatType
in interface VerificationTypeVisitor
public void visitLongType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LongType longType)
visitLongType
in interface VerificationTypeVisitor
public void visitDoubleType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, DoubleType doubleType)
visitDoubleType
in interface VerificationTypeVisitor
public void visitTopType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, TopType topType)
visitTopType
in interface VerificationTypeVisitor
public void visitObjectType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ObjectType objectType)
visitObjectType
in interface VerificationTypeVisitor
public void visitNullType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, NullType nullType)
visitNullType
in interface VerificationTypeVisitor
public void visitUninitializedType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, UninitializedType uninitializedType)
visitUninitializedType
in interface VerificationTypeVisitor
public void visitUninitializedThisType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, UninitializedThisType uninitializedThisType)
visitUninitializedThisType
in interface VerificationTypeVisitor
public void visitLineNumberInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LineNumberInfo lineNumberInfo)
visitLineNumberInfo
in interface LineNumberInfoVisitor
public void visitParameterInfo(Clazz clazz, Method method, int parameterIndex, ParameterInfo parameterInfo)
visitParameterInfo
in interface ParameterInfoVisitor
public void visitLocalVariableInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableInfo localVariableInfo)
visitLocalVariableInfo
in interface LocalVariableInfoVisitor
public void visitLocalVariableTypeInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeInfo localVariableTypeInfo)
visitLocalVariableTypeInfo
in interface LocalVariableTypeInfoVisitor
public void visitRequiresInfo(Clazz clazz, RequiresInfo requiresInfo)
visitRequiresInfo
in interface RequiresInfoVisitor
public void visitExportsInfo(Clazz clazz, ExportsInfo exportsInfo)
visitExportsInfo
in interface ExportsInfoVisitor
public void visitOpensInfo(Clazz clazz, OpensInfo opensInfo)
visitOpensInfo
in interface OpensInfoVisitor
public void visitProvidesInfo(Clazz clazz, ProvidesInfo providesInfo)
visitProvidesInfo
in interface ProvidesInfoVisitor
public void visitAnnotation(Clazz clazz, Annotation annotation)
AnnotationVisitor
visitAnnotation
in interface AnnotationVisitor
public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation)
visitAnnotation
in interface AnnotationVisitor
public void visitTypeAnnotation(Clazz clazz, TypeAnnotation typeAnnotation)
TypeAnnotationVisitor
visitTypeAnnotation
in interface TypeAnnotationVisitor
public void visitTypeParameterTargetInfo(Clazz clazz, TypeAnnotation typeAnnotation, TypeParameterTargetInfo typeParameterTargetInfo)
visitTypeParameterTargetInfo
in interface TargetInfoVisitor
public void visitSuperTypeTargetInfo(Clazz clazz, TypeAnnotation typeAnnotation, SuperTypeTargetInfo superTypeTargetInfo)
visitSuperTypeTargetInfo
in interface TargetInfoVisitor
public void visitTypeParameterBoundTargetInfo(Clazz clazz, TypeAnnotation typeAnnotation, TypeParameterBoundTargetInfo typeParameterBoundTargetInfo)
visitTypeParameterBoundTargetInfo
in interface TargetInfoVisitor
public void visitEmptyTargetInfo(Clazz clazz, Member member, TypeAnnotation typeAnnotation, EmptyTargetInfo emptyTargetInfo)
visitEmptyTargetInfo
in interface TargetInfoVisitor
public void visitFormalParameterTargetInfo(Clazz clazz, Method method, TypeAnnotation typeAnnotation, FormalParameterTargetInfo formalParameterTargetInfo)
visitFormalParameterTargetInfo
in interface TargetInfoVisitor
public void visitThrowsTargetInfo(Clazz clazz, Method method, TypeAnnotation typeAnnotation, ThrowsTargetInfo throwsTargetInfo)
visitThrowsTargetInfo
in interface TargetInfoVisitor
public void visitLocalVariableTargetInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, LocalVariableTargetInfo localVariableTargetInfo)
visitLocalVariableTargetInfo
in interface TargetInfoVisitor
public void visitCatchTargetInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, CatchTargetInfo catchTargetInfo)
visitCatchTargetInfo
in interface TargetInfoVisitor
public void visitOffsetTargetInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, OffsetTargetInfo offsetTargetInfo)
visitOffsetTargetInfo
in interface TargetInfoVisitor
public void visitTypeArgumentTargetInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, TypeArgumentTargetInfo typeArgumentTargetInfo)
visitTypeArgumentTargetInfo
in interface TargetInfoVisitor
public void visitTypePathInfo(Clazz clazz, TypeAnnotation typeAnnotation, TypePathInfo typePathInfo)
TypePathInfoVisitor
visitTypePathInfo
in interface TypePathInfoVisitor
public void visitLocalVariableTargetElement(Clazz clazz, Method method, CodeAttribute codeAttribute, TypeAnnotation typeAnnotation, LocalVariableTargetInfo localVariableTargetInfo, LocalVariableTargetElement localVariableTargetElement)
visitLocalVariableTargetElement
in interface LocalVariableTargetElementVisitor
public void visitConstantElementValue(Clazz clazz, Annotation annotation, ConstantElementValue constantElementValue)
visitConstantElementValue
in interface ElementValueVisitor
public void visitEnumConstantElementValue(Clazz clazz, Annotation annotation, EnumConstantElementValue enumConstantElementValue)
visitEnumConstantElementValue
in interface ElementValueVisitor
public void visitClassElementValue(Clazz clazz, Annotation annotation, ClassElementValue classElementValue)
visitClassElementValue
in interface ElementValueVisitor
public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue)
visitAnnotationElementValue
in interface ElementValueVisitor
public void visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue)
visitArrayElementValue
in interface ElementValueVisitor