public final class SyntheticAttribute extends AttributeInfo
SyntheticAttribute
denotes a Synthetic_attribute structure somewhere in a ClassFile structure.
This class is not thread-safe.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME
The name of the Synthetic_attribute structure.
|
Modifier and Type | Method and Description |
---|---|
SyntheticAttribute |
copy()
Returns a copy of this
SyntheticAttribute instance. |
boolean |
equals(java.lang.Object object)
Returns
true if, and only if, object is an instance of SyntheticAttribute , and that SyntheticAttribute instance is equal to this SyntheticAttribute instance, false
otherwise. |
static java.util.List<SyntheticAttribute> |
filter(Node node)
Returns a
List with all SyntheticAttribute s. |
int |
getAttributeLength()
Returns the attribute_length of this
SyntheticAttribute instance. |
int |
hashCode()
Returns a hash code for this
SyntheticAttribute instance. |
static SyntheticAttribute |
newInstance(int attributeNameIndex)
Returns a new
SyntheticAttribute instance. |
java.lang.String |
toString()
Returns a
String representation of this SyntheticAttribute instance. |
void |
write(java.io.DataOutput dataOutput)
Writes this
SyntheticAttribute to dataOutput . |
getAttributeNameIndex, getName, setAttributeNameIndex
public static final java.lang.String NAME
public java.lang.String toString()
String
representation of this SyntheticAttribute
instance.toString
in class java.lang.Object
String
representation of this SyntheticAttribute
instancepublic SyntheticAttribute copy()
SyntheticAttribute
instance.copy
in class AttributeInfo
SyntheticAttribute
instancepublic boolean equals(java.lang.Object object)
true
if, and only if, object
is an instance of SyntheticAttribute
, and that SyntheticAttribute
instance is equal to this SyntheticAttribute
instance, false
otherwise.equals
in class java.lang.Object
object
- an Object
to compare to this SyntheticAttribute
instance for equalitytrue
if, and only if, object
is an instance of SyntheticAttribute
, and that SyntheticAttribute
instance is equal to this SyntheticAttribute
instance, false
otherwisepublic int getAttributeLength()
SyntheticAttribute
instance.getAttributeLength
in class AttributeInfo
SyntheticAttribute
instancepublic int hashCode()
SyntheticAttribute
instance.hashCode
in class java.lang.Object
SyntheticAttribute
instancepublic void write(java.io.DataOutput dataOutput)
SyntheticAttribute
to dataOutput
.
If dataOutput
is an OutputStream
(or any other type of stream), this method will not close it.
If dataOutput
is null
, a NullPointerException
will be thrown.
If an I/O-error occurs, an UncheckedIOException
will be thrown.
write
in class AttributeInfo
dataOutput
- the DataOutput
to write tojava.lang.NullPointerException
- thrown if, and only if, dataOutput
is null
java.io.UncheckedIOException
- thrown if, and only if, an I/O-error occurspublic static java.util.List<SyntheticAttribute> filter(Node node)
List
with all SyntheticAttribute
s.
All SyntheticAttribute
s are found by traversing node
using a simple NodeHierarchicalVisitor
implementation.
If node
is null
, a NullPointerException
will be thrown.
node
- the Node
to start traversal fromList
with all SyntheticAttribute
sjava.lang.NullPointerException
- thrown if, and only if, node
is null
public static SyntheticAttribute newInstance(int attributeNameIndex)
SyntheticAttribute
instance.
If attributeNameIndex
is less than or equal to 0
, an IllegalArgumentException
will be thrown.
attributeNameIndex
- the attribute_name_index of the new SyntheticAttribute
instanceSyntheticAttribute
instancejava.lang.IllegalArgumentException
- thrown if, and only if, attributeNameIndex
is less than or equal to 0