public final class ConstantDoubleInfo extends CPInfo
ConstantDoubleInfo
denotes a CONSTANT_Double_info structure in the constant_pool of a ClassFile structure.
The CONSTANT_Double_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_Double_info structure.
|
static int |
TAG
The tag for CONSTANT_Double.
|
Modifier and Type | Method and Description |
---|---|
ConstantDoubleInfo |
copy()
Returns a copy of this
ConstantDoubleInfo instance. |
boolean |
equals(java.lang.Object object)
Returns
true if, and only if, object is an instance of ConstantDoubleInfo , and that ConstantDoubleInfo instance is equal to this ConstantDoubleInfo instance, false
otherwise. |
static java.util.List<ConstantDoubleInfo> |
filter(Node node)
Returns a
List with all ConstantDoubleInfo s. |
double |
getDouble()
Returns a
double representation of this ConstantDoubleInfo instance. |
int |
hashCode()
Returns a hash code for this
ConstantDoubleInfo instance. |
static ConstantDoubleInfo |
newInstance(double value)
Returns a new
ConstantDoubleInfo . |
void |
setDouble(double value)
Sets a new
double representation for this ConstantDoubleInfo instance. |
java.lang.String |
toString()
Returns a
String representation of this ConstantDoubleInfo instance. |
void |
write(java.io.DataOutput dataOutput)
Writes this
ConstantDoubleInfo to dataOutput . |
void |
write(Document document)
Writes this
ConstantDoubleInfo to document . |
getConstantPoolEntryCount, getName, getTag
public static final java.lang.String NAME
public static final int TAG
public ConstantDoubleInfo copy()
ConstantDoubleInfo
instance.public java.lang.String toString()
String
representation of this ConstantDoubleInfo
instance.toString
in class java.lang.Object
String
representation of this ConstantDoubleInfo
instancepublic boolean equals(java.lang.Object object)
true
if, and only if, object
is an instance of ConstantDoubleInfo
, and that ConstantDoubleInfo
instance is equal to this ConstantDoubleInfo
instance, false
otherwise.equals
in class java.lang.Object
object
- an Object
to compare to this ConstantDoubleInfo
instance for equalitytrue
if, and only if, object
is an instance of ConstantDoubleInfo
, and that ConstantDoubleInfo
instance is equal to this ConstantDoubleInfo
instance, false
otherwisepublic double getDouble()
double
representation of this ConstantDoubleInfo
instance.double
representation of this ConstantDoubleInfo
instancepublic int hashCode()
ConstantDoubleInfo
instance.hashCode
in class java.lang.Object
ConstantDoubleInfo
instancepublic void setDouble(double value)
double
representation for this ConstantDoubleInfo
instance.value
- the new double
representationpublic void write(java.io.DataOutput dataOutput)
ConstantDoubleInfo
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)
ConstantDoubleInfo
to document
.
If document
is null
, a NullPointerException
may be thrown. But no guarantees can be made.
public static ConstantDoubleInfo newInstance(double value)
ConstantDoubleInfo
.value
- the double
representation of the new ConstantDoubleInfo
instanceConstantDoubleInfo
public static java.util.List<ConstantDoubleInfo> filter(Node node)
List
with all ConstantDoubleInfo
s.
All ConstantDoubleInfo
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 ConstantDoubleInfo
sjava.lang.NullPointerException
- thrown if, and only if, node
is null