public final class ConstantLongInfo extends CPInfo
ConstantLongInfo
denotes a CONSTANT_Long_info structure in the constant_pool of a ClassFile structure.
The CONSTANT_Long_info structure was added to Java in version 1.0.2.
This class is not thread-safe.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME
The name of the CONSTANT_Long_info structure.
|
static int |
TAG
The tag for CONSTANT_Long.
|
Modifier and Type | Method and Description |
---|---|
ConstantLongInfo |
copy()
Returns a copy of this
ConstantLongInfo instance. |
boolean |
equals(java.lang.Object object)
Returns
true if, and only if, object is an instance of ConstantLongInfo , and that ConstantLongInfo instance is equal to this ConstantLongInfo instance, false otherwise. |
static java.util.List<ConstantLongInfo> |
filter(Node node)
Returns a
List with all ConstantLongInfo s. |
long |
getLong()
Returns a
long representation of this ConstantLongInfo instance. |
int |
hashCode()
Returns a hash code for this
ConstantLongInfo instance. |
static ConstantLongInfo |
newInstance(long value)
Returns a new
ConstantLongInfo . |
void |
setLong(long value)
Sets a new
long representation for this ConstantLongInfo instance. |
java.lang.String |
toString()
Returns a
String representation of this ConstantLongInfo instance. |
void |
write(java.io.DataOutput dataOutput)
Writes this
ConstantLongInfo to dataOutput . |
void |
write(Document document)
Writes this
ConstantLongInfo to document . |
getConstantPoolEntryCount, getName, getTag
public static final java.lang.String NAME
public static final int TAG
public ConstantLongInfo copy()
ConstantLongInfo
instance.public java.lang.String toString()
String
representation of this ConstantLongInfo
instance.toString
in class java.lang.Object
String
representation of this ConstantLongInfo
instancepublic boolean equals(java.lang.Object object)
true
if, and only if, object
is an instance of ConstantLongInfo
, and that ConstantLongInfo
instance is equal to this ConstantLongInfo
instance, false
otherwise.equals
in class java.lang.Object
object
- an Object
to compare to this ConstantLongInfo
instance for equalitytrue
if, and only if, object
is an instance of ConstantLongInfo
, and that ConstantLongInfo
instance is equal to this ConstantLongInfo
instance, false
otherwisepublic int hashCode()
ConstantLongInfo
instance.hashCode
in class java.lang.Object
ConstantLongInfo
instancepublic long getLong()
long
representation of this ConstantLongInfo
instance.long
representation of this ConstantLongInfo
instancepublic void setLong(long value)
long
representation for this ConstantLongInfo
instance.value
- the new long
representationpublic void write(java.io.DataOutput dataOutput)
ConstantLongInfo
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.
public void write(Document document)
ConstantLongInfo
to document
.
If document
is null
, a NullPointerException
may be thrown. But no guarantees can be made.
public static ConstantLongInfo newInstance(long value)
ConstantLongInfo
.value
- the long
representation of the new ConstantLongInfo
instanceConstantLongInfo
public static java.util.List<ConstantLongInfo> filter(Node node)
List
with all ConstantLongInfo
s.
All ConstantLongInfo
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 ConstantLongInfo
sjava.lang.NullPointerException
- thrown if, and only if, node
is null