Attribute and manages unknown attributes encountered by ASM that have had a layout definition given to pack200 (e.g. via one of
the -C, -M, -F or -D command line options)
| Modifier and Type | Class and Description |
|---|---|
| public static class | NewAttribute.ErrorAttribute
ErrorAttribute extends |
| public static class | NewAttribute.PassAttribute
PassAttribute extends |
| public static class | NewAttribute.StripAttribute
StripAttribute extends |
| Modifier and Type | Field and Description |
|---|---|
| private char[] | |
| private ClassReader | |
| private int | |
| private byte[] | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private Label[] | |
| private final String |
| Access | Constructor and Description |
|---|---|
| public | NewAttribute(final ClassReader classReader, final String type, final String layout, final byte[] contents, final char[] buf, final int codeOff, final Label[] labels)
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public byte[] | |
| public Label | |
| public String | |
| public boolean | isCodeAttribute()
Overrides org. |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | isUnknown()
Overrides org. |
| public boolean | |
| protected Attribute | read(final ClassReader
the class that contains the attribute to be read. cr, final int index of the first byte of the attribute's content in off, final int ClassReader. The 6
attribute header bytes (attribute_name_index and attribute_length) are not taken into
account here.the length of the attribute's content (excluding the 6 attribute header bytes). len, final char[] the buffer to be used to call the ClassReader methods requiring a
'charBuffer' parameter. buf, final int index of the first byte of content of the enclosing Code attribute
in codeOff, final Label[] ClassReader, or -1 if the attribute to be read is not a Code attribute. The 6
attribute header bytes (attribute_name_index and attribute_length) are not taken into
account here.the labels of the method's code, or null if the attribute to be read
is not a Code attribute. labels)Overrides org. type attribute.
|
| public String | |
| public Object | |
| public String |
| buf | back to summary |
|---|---|
| private char[] buf | |
| classReader | back to summary |
|---|---|
| private ClassReader classReader | |
| codeOff | back to summary |
|---|---|
| private int codeOff | |
| contents | back to summary |
|---|---|
| private byte[] contents | |
| contextClass | back to summary |
|---|---|
| private boolean contextClass | |
| contextCode | back to summary |
|---|---|
| private boolean contextCode | |
| contextField | back to summary |
|---|---|
| private boolean contextField | |
| contextMethod | back to summary |
|---|---|
| private boolean contextMethod | |
| labels | back to summary |
|---|---|
| private Label[] labels | |
| layout | back to summary |
|---|---|
| private final String layout | |
| NewAttribute | back to summary |
|---|---|
| public NewAttribute(final ClassReader classReader, final String type, final String layout, final byte[] contents, final char[] buf, final int codeOff, final Label[] labels) | |
| NewAttribute | back to summary |
|---|---|
| public NewAttribute(final String type, final String layout, final int context) | |
| addContext | back to summary |
|---|---|
| public void addContext(final int context) | |
| getBytes | back to summary |
|---|---|
| public byte[] getBytes() | |
| getLabel | back to summary |
|---|---|
| public Label getLabel(final int index) | |
| getLayout | back to summary |
|---|---|
| public String getLayout() | |
| isCodeAttribute | back to summary |
|---|---|
| public boolean isCodeAttribute() Overrides org. Doc from org. Returns true if this type of attribute is a Code attribute.
| |
| isContextClass | back to summary |
|---|---|
| public boolean isContextClass() | |
| isContextCode | back to summary |
|---|---|
| public boolean isContextCode() | |
| isContextField | back to summary |
|---|---|
| public boolean isContextField() | |
| isContextMethod | back to summary |
|---|---|
| public boolean isContextMethod() | |
| isUnknown | back to summary |
|---|---|
| public boolean isUnknown() Overrides org. Doc from org. Returns true if this type of attribute is unknown. This means that the attribute content can't be parsed to extract constant pool references, labels, etc. Instead, the attribute content is read as an opaque byte array, and written back as is. This can lead to invalid attributes, if the content actually contains constant pool references, labels, or other symbolic references that need to be updated when there are changes to the constant pool, the method bytecode, etc. The default implementation of this method always returns true.
| |
| isUnknown | back to summary |
|---|---|
| public boolean isUnknown(final int context) | |
| read | back to summary |
|---|---|
| protected Attribute read(final ClassReader cr, final int off, final int len, final char[] buf, final int codeOff, final Label[] labels) Overrides org. Doc from org. Reads a
| |
| readClass | back to summary |
|---|---|
| public String readClass(final int index) | |
| readConst | back to summary |
|---|---|
| public Object readConst(final int index) | |
| readUTF8 | back to summary |
|---|---|
| public String readUTF8(final int index) | |
NewAttribute and manages attributes encountered by ASM that have had an error action specified to pack200 (e.g. via one of
the -C, -M, -F or -D command line options such as -Cattribute-name=error)
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Attribute | read(final ClassReader
the class that contains the attribute to be read. cr, final int index of the first byte of the attribute's content in off, final int ClassReader. The 6
attribute header bytes (attribute_name_index and attribute_length) are not taken into
account here.the length of the attribute's content (excluding the 6 attribute header bytes). len, final char[] the buffer to be used to call the ClassReader methods requiring a
'charBuffer' parameter. buf, final int index of the first byte of content of the enclosing Code attribute
in codeOff, final Label[] ClassReader, or -1 if the attribute to be read is not a Code attribute. The 6
attribute header bytes (attribute_name_index and attribute_length) are not taken into
account here.the labels of the method's code, or null if the attribute to be read
is not a Code attribute. labels)Overrides org. type attribute.
|
| ErrorAttribute | back to summary |
|---|---|
| public ErrorAttribute(final String type, final int context) | |
| read | back to summary |
|---|---|
| protected Attribute read(final ClassReader cr, final int off, final int len, final char[] buf, final int codeOff, final Label[] labels) Overrides org. Doc from org. Reads a
| |
NewAttribute and manages attributes encountered by ASM that have had a pass action specified to pack200 (e.g. via one of
the -C, -M, -F or -D command line options such as -Cattribute-name=pass)
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Attribute | read(final ClassReader
the class that contains the attribute to be read. cr, final int index of the first byte of the attribute's content in off, final int ClassReader. The 6
attribute header bytes (attribute_name_index and attribute_length) are not taken into
account here.the length of the attribute's content (excluding the 6 attribute header bytes). len, final char[] the buffer to be used to call the ClassReader methods requiring a
'charBuffer' parameter. buf, final int index of the first byte of content of the enclosing Code attribute
in codeOff, final Label[] ClassReader, or -1 if the attribute to be read is not a Code attribute. The 6
attribute header bytes (attribute_name_index and attribute_length) are not taken into
account here.the labels of the method's code, or null if the attribute to be read
is not a Code attribute. labels)Overrides org. type attribute.
|
| PassAttribute | back to summary |
|---|---|
| public PassAttribute(final String type, final int context) | |
| read | back to summary |
|---|---|
| protected Attribute read(final ClassReader cr, final int off, final int len, final char[] buf, final int codeOff, final Label[] labels) Overrides org. Doc from org. Reads a
| |
NewAttribute and manages attributes encountered by ASM that have had a strip action specified to pack200 (e.g. via one of
the -C, -M, -F or -D command line options such as -Cattribute-name=strip)
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected Attribute | read(final ClassReader
the class that contains the attribute to be read. cr, final int index of the first byte of the attribute's content in off, final int ClassReader. The 6
attribute header bytes (attribute_name_index and attribute_length) are not taken into
account here.the length of the attribute's content (excluding the 6 attribute header bytes). len, final char[] the buffer to be used to call the ClassReader methods requiring a
'charBuffer' parameter. buf, final int index of the first byte of content of the enclosing Code attribute
in codeOff, final Label[] ClassReader, or -1 if the attribute to be read is not a Code attribute. The 6
attribute header bytes (attribute_name_index and attribute_length) are not taken into
account here.the labels of the method's code, or null if the attribute to be read
is not a Code attribute. labels)Overrides org. type attribute.
|
| StripAttribute | back to summary |
|---|---|
| public StripAttribute(final String type, final int context) | |
| read | back to summary |
|---|---|
| protected Attribute read(final ClassReader cr, final int off, final int len, final char[] buf, final int codeOff, final Label[] labels) Overrides org. Doc from org. Reads a
| |