Package org.openjdk.asmtools.jdec
Class ClassData
java.lang.Object
org.openjdk.asmtools.jdec.ClassData
Class data of the Java Decoder
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate NestedByteArrayInputStream
private int[]
private int
private Object[]
(package private) boolean
private String
private String
private static final char[]
static I18NResourceBundle
private DataInputStream
private PrintWriter
private boolean
private int
private byte[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
decodeAnnotation
(DataInputStream in, PrintWriter out) private void
decodeAttr
(DataInputStream in, PrintWriter out) private void
decodeAttrs
(DataInputStream in, PrintWriter out) private void
(package private) void
decodeClass
(String fileName) private void
decodeCPXAttr
(DataInputStream in, int len, String attrname, PrintWriter out) private void
decodeCPXAttrM
(DataInputStream in, int len, String attrname, PrintWriter out, int expectedIndices) private void
decodeElementValue
(DataInputStream in, PrintWriter out) private void
decodeElementValuePairs
(int count, DataInputStream in, PrintWriter out) private void
decodeInfo
(DataInputStream in, PrintWriter out, String elementName, boolean hasAccessFlag) component_info { JEP 359 Record(Preview): class file 58.65535 u2 name_index; u2 descriptor_index; u2 attributes_count; attribute_info attributes[attributes_count]; } or field_info { u2 access_flags; u2 name_index; u2 descriptor_index; u2 attributes_count; attribute_info attributes[attributes_count]; } or method_info { u2 access_flags; u2 name_index; u2 descriptor_index; u2 attributes_count; attribute_info attributes[attributes_count]; }private void
decodeMembers
(DataInputStream in, PrintWriter out, String groupName, String elementName) private void
private void
decodeModuleStatement
(String statementName, DataInputStream in) private void
Processes 4.7.20 The RuntimeVisibleTypeAnnotations Attribute, 4.7.21 The RuntimeInvisibleTypeAnnotations Attributetype_annotation
structure.private void
private void
decodeTypes
(DataInputStream in, PrintWriter out, int count) private String
private String
boolean
isPrintableChar
(char c) private void
private void
private void
private void
private void
printByteHex
(PrintWriter out, int b) private void
printBytes
(PrintWriter out, DataInputStream in, int len) private void
printCP
(PrintWriter out) private void
private void
printStackMap
(DataInputStream in, int elementsNum) private void
printUtf8InfoIndex
(int index, String indexName) private void
private String
startArray
(int length) private void
startArrayCmt
(int length, String comment) private void
startArrayCmtB
(int length, String comment) private String
toHex
(long val) private String
toHex
(long val, int width) void
void
-
Field Details
-
types
private byte[] types -
cpool
-
CPlen
private int CPlen -
countedin
-
in
-
out
-
cpe_pos
private int[] cpe_pos -
printDetails
private boolean printDetails -
entityType
-
entityName
-
i18n
-
hexTable
private static final char[] hexTable -
shift
private int shift -
DebugFlag
boolean DebugFlag
-
-
Constructor Details
-
ClassData
ClassData(DataInputStream dis, int printFlags, PrintWriter out) throws IOException - Throws:
IOException
-
-
Method Details
-
toHex
-
toHex
-
printByteHex
-
printBytes
- Throws:
IOException
-
printRestOfBytes
private void printRestOfBytes() -
printUtf8InfoIndex
-
out_begin
-
out_print
-
out_println
-
out_end
-
startArray
-
startArrayCmt
-
startArrayCmtB
-
readCP
- Throws:
IOException
-
printCP
-
getStringPos
-
getCommentPosCond
-
decodeCPXAttr
private void decodeCPXAttr(DataInputStream in, int len, String attrname, PrintWriter out) throws IOException - Throws:
IOException
-
decodeCPXAttrM
private void decodeCPXAttrM(DataInputStream in, int len, String attrname, PrintWriter out, int expectedIndices) throws IOException - Throws:
IOException
-
printStackMap
- Throws:
IOException
-
decodeTargetTypeAndRefInfo
Processes 4.7.20 The RuntimeVisibleTypeAnnotations Attribute, 4.7.21 The RuntimeInvisibleTypeAnnotations Attributetype_annotation
structure.- Throws:
IOException
-
decodeElementValue
- Throws:
IOException
-
isPrintableChar
public boolean isPrintableChar(char c) -
decodeAnnotation
- Throws:
IOException
-
decodeElementValuePairs
private void decodeElementValuePairs(int count, DataInputStream in, PrintWriter out) throws IOException - Throws:
IOException
-
decodeInfo
private void decodeInfo(DataInputStream in, PrintWriter out, String elementName, boolean hasAccessFlag) throws IOException component_info { JEP 359 Record(Preview): class file 58.65535 u2 name_index; u2 descriptor_index; u2 attributes_count; attribute_info attributes[attributes_count]; } or field_info { u2 access_flags; u2 name_index; u2 descriptor_index; u2 attributes_count; attribute_info attributes[attributes_count]; } or method_info { u2 access_flags; u2 name_index; u2 descriptor_index; u2 attributes_count; attribute_info attributes[attributes_count]; }- Throws:
IOException
-
decodeTypeAnnotation
- Throws:
IOException
-
decodeBootstrapMethod
- Throws:
IOException
-
decodeAttr
- Throws:
IOException
-
decodeModuleStatement
- Throws:
IOException
-
decodeModule
- Throws:
IOException
-
decodeAttrs
- Throws:
IOException
-
decodeMembers
private void decodeMembers(DataInputStream in, PrintWriter out, String groupName, String elementName) throws IOException - Throws:
IOException
-
decodeClass
- Throws:
IOException
-
decodeTypes
- Throws:
IOException
-
trace
-
traceln
-