public final class SyntheticAttribute_info extends Attribute_info
Field_info, and
Method_info structures. A class member that does
not appear in the source code must be marked using a Synthetic attribute.The Synthetic attribute has the following format:
Synthetic_attribute {
u2 attribute_name_index;
u4 attribute_length;
}
The value of the attribute_name_index item must be a valid index into the
constant_pool table. The constant_pool entry at that index must be a CONSTANT_Utf8_info
structure representing the string "Synthetic".The value of the attribute_length item is zero.
ATTRIBUTE_BRIDGE, ATTRIBUTE_CODE, ATTRIBUTE_CONSTANT_VALUE, ATTRIBUTE_EXCEPTIONS, ATTRIBUTE_INNERCLASSES, ATTRIBUTE_LINE_NUMBER_TABLE, ATTRIBUTE_SOURCEFILE, ATTRIBUTE_SYNTHETIC, m_attribute_length, m_name_index| Constructor and Description |
|---|
SyntheticAttribute_info(int attribute_name_index) |
SyntheticAttribute_info(int attribute_name_index,
long attribute_length) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(IAttributeVisitor visitor,
java.lang.Object ctx) |
java.lang.Object |
clone()
Performs a deep copy.
|
long |
length()
Returns the total length of this attribute when converted to
.class format [including the 6-byte header]
|
java.lang.String |
toString() |
void |
writeInClassFormat(UDataOutputStream out) |
getName, new_Attribute_infopublic SyntheticAttribute_info(int attribute_name_index)
SyntheticAttribute_info(int attribute_name_index,
long attribute_length)
public long length()
Attribute_infolength in class Attribute_infopublic void accept(IAttributeVisitor visitor, java.lang.Object ctx)
accept in class Attribute_infopublic java.lang.String toString()
toString in class Attribute_infopublic java.lang.Object clone()
clone in class Attribute_infopublic void writeInClassFormat(UDataOutputStream out) throws java.io.IOException
writeInClassFormat in interface IClassFormatOutputwriteInClassFormat in class Attribute_infojava.io.IOException