Class ClassData
- All Implemented Interfaces:
Printable
Central class data for of the Java Disassembler
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class MemberData
MemberData.AnnotationElementStateNested classes/interfaces inherited from class Indenter
Indenter.NotImplementedException -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprotected Container<BootstrapMethodData, ClassData> private booleanprotected CFVersionprivate Pathprotected Stringprotected Stringprotected EnclosingMethodDataprotected Container<InnerClassData, ClassData> protected int[]protected LoadableDescriptorsDataprotected Container<MethodData, ClassData> protected ModuleDataprotected NestHostDataprotected NestMembersDataprotected Stringprotected PermittedSubclassesDataprotected RecordDataprotected SourceDebugExtensionDataprotected SourceFileDataprivate TextLinesprotected intprotected intprivate intAttributes: SourceFile 45.3 InnerClasses 45.3 EnclosingMethod 49.0 SourceDebugExtension 49.0 BootstrapMethods 51.0 Module, ModulePackages, ModuleMainClass 53.0 NestHost, NestMembers 55.0 Record 60.0 PermittedSubclasses 61.0 ------------------------------------------------- Synthetic 45.3 Deprecated 45.3 Signature 49.0 RuntimeVisibleAnnotations 49.0 RuntimeInvisibleAnnotations 49.0 RuntimeVisibleTypeAnnotations 52.0 RuntimeInvisibleTypeAnnotations 52.0Fields inherited from class MemberData
access, attributes, data, DEFAULT_VALUE_PREFIX, environment, invisibleAnnotations, invisibleTypeAnnotations, isDeprecated, isSynthetic, memberType, owner, pool, signature, visibleAnnotations, visibleTypeAnnotationsFields inherited from class Indenter
ARGUMENT_DELIMITER, bestEffort, BootstrapArgumentsBreakPositions, BootstrapMethodBreakPositions, CIRCULAR_COMMENT_OFFSET, COMMENT_PADDING, commentOffset, detailedOutput, dropCharacterRange, dropClasses, dropSignatures, dropSourceFile, extraDetailedOutput, hasSize, INDENT_CHAR, INDENT_OFFSET, INDENT_STEP, INDENT_STRING, INITIAL_COMMENT_OFFSET, INSTR_PREFIX_LENGTH, InvokeDynamicBreakPositions, LdwBreakPositions, LINE_SPLITTER, maxSize, maxSizeCalculated, NO_BSM_ARGUMENTS, NO_BSM_ARGUMENTS_REGEX, OPERAND_PLACEHOLDER_LENGTH, printable, printConstantPool, printCPIndex, printHEX, printLabelAsIdentifiers, printLineNumber, printLineTable, printLineTableLines, printLineTableNumbers, printLocalVariables, printLocalVariableTypes, printProgramCounter, printSourceLines, PROGRAM_COUNTER_PLACEHOLDER_LENGTH, REPLACEMENT_NO_BSM_ARGUMENTS, skipComments, STACKMAP_TYPE_PLACEHOLDER_LENGTH, sysInfo, TABLE_PADDING, tableFormat, tableToken, toolOutput, UNDEFINED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetListOfPrintableAttributes(P... attributes) getSrcLine(int lineNum) Read and resolve the attribute dataprotected booleanhandleAttributes(DataInputStream in, EAttribute attributeTag, int attributeLength) Read and resolve the attribute databooleanDetermines if this Class has a packageprivate voidinitClassNames(int this_cpx) Initializes class, package names needed for printing asm filebooleanprivate <P extends Printable>
booleanisPrintable(P... attributes) voidPrints the JASM file as much as it was read if exceptions occur during reading.voidprint()Print jasm file in simple/table format.protected <T extends AnnotationData>
voidprintAnnotations(List<T>... annotationLists) Print member's (ClassData, MethodData, FieldData and RecordData) annotationsprivate <P extends Printable>
voidprintAttributes(List<P> attributeList, int commentOffset) protected voidprotected voidprivate booleanprintMemberDataList(Container<? extends MemberData<ClassData>, ClassData> list, int commentOffset) protected voidPrints system comments if the option -sysinfo is used.voidread(DataInputStream in, Path src) Read and resolve the class dataprotected voidRead and resolve the field dataprotected voidRead and resolve the interface dataprotected voidRead and resolve the method dataMethods inherited from class MemberData
calculateInlinedTitleShift, getAnnotationElementState, getAnnotationsCount, getConstantPool, getListOf, getPseudoFlagsAsString, handleUnrecognizedAttributes, init, printAttributes, printVar, readAttributes, setElementState, setOwner, setSignatureMethods inherited from class Indenter
decIndent, decIndent, enlargedIndent, enlargedIndent, formatOperandLine, getCommentOffset, getIndentSize, getIndentStep, getIndentString, getLabelPrefix, getOffset, getPrintAttributeCommentPadding, getPrintAttributeKeyPadding, getTitle, incIndent, incIndent, Indent, IndentPadLeft, IndentPadRight, initIndent, isTableOutput, jasmPrint, jasmPrint, nCopies, padLeft, PadLeft, padRight, PadRight, print, print, print, printIndent, printIndent, printIndent, printIndentLn, printIndentLn, printIndentLn, printIndentPadLeft, printIndentPadRight, println, println, println, println, printPadLeft, printPadRight, setCommentOffset, setHasSize, setOffset, setTheSame, tableFormatSupported, tablePrint, tablePrintMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Printable
isPrintable
-
Field Details
-
alreadyPrinted
private boolean alreadyPrinted -
canBePrinted
private boolean canBePrinted -
cfVersion
-
this_cpx
protected int this_cpx -
super_cpx
protected int super_cpx -
className
-
packageName
-
classShortName
-
interfaces
protected int[] interfaces -
fields
-
methods
-
totalAttributes
private int totalAttributesAttributes: SourceFile 45.3 InnerClasses 45.3 EnclosingMethod 49.0 SourceDebugExtension 49.0 BootstrapMethods 51.0 Module, ModulePackages, ModuleMainClass 53.0 NestHost, NestMembers 55.0 Record 60.0 PermittedSubclasses 61.0 ------------------------------------------------- Synthetic 45.3 Deprecated 45.3 Signature 49.0 RuntimeVisibleAnnotations 49.0 RuntimeInvisibleAnnotations 49.0 RuntimeVisibleTypeAnnotations 52.0 RuntimeInvisibleTypeAnnotations 52.0 -
sourceFileData
-
innerClasses
-
enclosingMethodData
-
recordData
-
bootstrapMethods
-
moduleData
-
nestHost
-
nestMembers
-
permittedSubclassesData
-
sourceDebugExtensionData
-
loadableDescriptorsData
-
sourceLines
-
classFile
-
-
Constructor Details
-
ClassData
-
-
Method Details
-
isDetailedOutput
public boolean isDetailedOutput() -
readFields
Read and resolve the field data- Throws:
IOException
-
readMethods
Read and resolve the method data- Throws:
IOException
-
readInterfaces
Read and resolve the interface data- Throws:
IOException
-
handleAttributes
protected boolean handleAttributes(DataInputStream in, EAttribute attributeTag, int attributeLength) throws IOException Read and resolve the attribute data- Overrides:
handleAttributesin classMemberData<ClassData>- Throws:
IOException
-
read
Read and resolve the class data- Throws:
IOException
-
initClassNames
private void initClassNames(int this_cpx) Initializes class, package names needed for printing asm file- Parameters:
this_cpx- The constant_pool entry at that index is a CONSTANT_Class_info structure (ยง4.4.1) representing the class or interface defined by this class file or this_class is module-info in the case of a module.
-
hasPackage
public boolean hasPackage()Determines if this Class has a package- Returns:
- true if the package exists for this class
-
getClassName
-
getSrcLine
Read and resolve the attribute data -
printAnnotations
protected <T extends AnnotationData> void printAnnotations(List<T>... annotationLists) throws IOException Description copied from class:MemberDataPrint member's (ClassData, MethodData, FieldData and RecordData) annotations- Overrides:
printAnnotationsin classMemberData<ClassData>- Throws:
IOException- signals that an exception to some sort has occurred
-
postPrint
public void postPrint()Prints the JASM file as much as it was read if exceptions occur during reading. -
print
Print jasm file in simple/table format.- Specified by:
printin interfacePrintable- Overrides:
printin classIndenter- Throws:
IOException
-
printClassIntroduction
- Throws:
IOException
-
printSysInfo
protected void printSysInfo()Description copied from class:MemberDataPrints system comments if the option -sysinfo is used.- Overrides:
printSysInfoin classMemberData<ClassData>
-
printJasmClassDeclaration
protected void printJasmClassDeclaration() -
getListOfPrintableAttributes
-
isPrintable
-
printAttributes
private <P extends Printable> void printAttributes(List<P> attributeList, int commentOffset) throws IOException - Throws:
IOException
-
printMemberDataList
private boolean printMemberDataList(Container<? extends MemberData<ClassData>, ClassData> list, int commentOffset) throws IOException - Throws:
IOException
-