public final class SourceDebugExtensionAttribute extends AttributeInfo
SourceDebugExtensionAttribute
denotes a SourceDebugExtension_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 SourceDebugExtension_attribute structure.
|
Modifier and Type | Method and Description |
---|---|
SourceDebugExtensionAttribute |
copy()
Returns a copy of this
SourceDebugExtensionAttribute instance. |
boolean |
equals(java.lang.Object object)
Returns
true if, and only if, object is an instance of SourceDebugExtensionAttribute , and that SourceDebugExtensionAttribute instance is equal to this
SourceDebugExtensionAttribute instance, false otherwise. |
static java.util.List<SourceDebugExtensionAttribute> |
filter(Node node)
Returns a
List with all SourceDebugExtensionAttribute s. |
int |
getAttributeLength()
Returns the attribute_length of this
SourceDebugExtensionAttribute instance. |
java.lang.String |
getDebugExtension()
Returns the debug_extension of this
SourceDebugExtensionAttribute instance. |
int |
hashCode()
Returns a hash code for this
SourceDebugExtensionAttribute instance. |
static SourceDebugExtensionAttribute |
newInstance(int attributeNameIndex,
java.lang.String debugExtension)
Returns a new
SourceDebugExtensionAttribute instance. |
void |
setDebugExtension(java.lang.String debugExtension)
Sets a new debug_extension for this
SourceDebugExtensionAttribute instance. |
java.lang.String |
toString()
Returns a
String representation of this SourceDebugExtensionAttribute instance. |
void |
write(java.io.DataOutput dataOutput)
Writes this
SourceDebugExtensionAttribute to dataOutput . |
getAttributeNameIndex, getName, setAttributeNameIndex
public static final java.lang.String NAME
public SourceDebugExtensionAttribute copy()
SourceDebugExtensionAttribute
instance.copy
in class AttributeInfo
SourceDebugExtensionAttribute
instancepublic java.lang.String getDebugExtension()
SourceDebugExtensionAttribute
instance.SourceDebugExtensionAttribute
instancepublic java.lang.String toString()
String
representation of this SourceDebugExtensionAttribute
instance.toString
in class java.lang.Object
String
representation of this SourceDebugExtensionAttribute
instancepublic boolean equals(java.lang.Object object)
true
if, and only if, object
is an instance of SourceDebugExtensionAttribute
, and that SourceDebugExtensionAttribute
instance is equal to this
SourceDebugExtensionAttribute
instance, false
otherwise.equals
in class java.lang.Object
object
- an Object
to compare to this SourceDebugExtensionAttribute
instance for equalitytrue
if, and only if, object
is an instance of SourceDebugExtensionAttribute
, and that SourceDebugExtensionAttribute
instance is equal to this
SourceDebugExtensionAttribute
instance, false
otherwisepublic int getAttributeLength()
SourceDebugExtensionAttribute
instance.getAttributeLength
in class AttributeInfo
SourceDebugExtensionAttribute
instance.public int hashCode()
SourceDebugExtensionAttribute
instance.hashCode
in class java.lang.Object
SourceDebugExtensionAttribute
instancepublic void setDebugExtension(java.lang.String debugExtension)
SourceDebugExtensionAttribute
instance.
If debugExtension
is null
, a NullPointerException
will be thrown.
debugExtension
- the new debug_extension for this SourceDebugExtensionAttribute
instancejava.lang.NullPointerException
- thrown if, and only if, debugExtension
is null
public void write(java.io.DataOutput dataOutput)
SourceDebugExtensionAttribute
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<SourceDebugExtensionAttribute> filter(Node node)
List
with all SourceDebugExtensionAttribute
s.
All SourceDebugExtensionAttribute
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 SourceDebugExtensionAttribute
sjava.lang.NullPointerException
- thrown if, and only if, node
is null
public static SourceDebugExtensionAttribute newInstance(int attributeNameIndex, java.lang.String debugExtension)
SourceDebugExtensionAttribute
instance.
If attributeNameIndex
is less than or equal to 0
, an IllegalArgumentException
will be thrown.
If debugExtension
is null
, a NullPointerException
will be thrown.
attributeNameIndex
- the attribute_name_index of the new SourceDebugExtensionAttribute
instancedebugExtension
- the debug_extension of the new SourceDebugExtensionAttribute
instanceSourceDebugExtensionAttribute
instancejava.lang.IllegalArgumentException
- thrown if, and only if, attributeNameIndex
is less than or equal to 0
java.lang.NullPointerException
- thrown if, and only if, debugExtension
is null