com.vladium.jcd.cls.attribute
Class SyntheticAttribute_info
java.lang.Object
com.vladium.jcd.cls.attribute.Attribute_info
com.vladium.jcd.cls.attribute.SyntheticAttribute_info
- All Implemented Interfaces:
- IClassFormatOutput, java.lang.Cloneable
public final class SyntheticAttribute_info
- extends Attribute_info
The Synthetic attribute is a fixed-length attribute in the attributes table
of ClassFile, 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.
- Author:
- (C) 2001, Vlad Roubtsov
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
SyntheticAttribute_info
public SyntheticAttribute_info(int attribute_name_index)
SyntheticAttribute_info
SyntheticAttribute_info(int attribute_name_index,
long attribute_length)
length
public long length()
- Description copied from class:
Attribute_info
- Returns the total length of this attribute when converted to
.class format [including the 6-byte header]
- Specified by:
length
in class Attribute_info
accept
public void accept(IAttributeVisitor visitor,
java.lang.Object ctx)
- Specified by:
accept
in class Attribute_info
toString
public java.lang.String toString()
- Specified by:
toString
in class Attribute_info
clone
public java.lang.Object clone()
- Performs a deep copy.
- Overrides:
clone
in class Attribute_info
writeInClassFormat
public void writeInClassFormat(UDataOutputStream out)
throws java.io.IOException
- Specified by:
writeInClassFormat
in interface IClassFormatOutput
- Overrides:
writeInClassFormat
in class Attribute_info
- Throws:
java.io.IOException