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