Package org.apache.bcel.classfile
Class ConstantUtf8
java.lang.Object
org.apache.bcel.classfile.Constant
org.apache.bcel.classfile.ConstantUtf8
- All Implemented Interfaces:
Serializable,Cloneable,Node
This class is derived from the abstract
Constant class
and represents a reference to a Utf8 encoded string.
- See Also:
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class.final voiddump(DataOutputStream file) Dump String in Utf8 format to file stream.final StringgetBytes()static ConstantUtf8static ConstantUtf8getInstance(DataInputStream file) static ConstantUtf8final voidDeprecated.final StringtoString()Methods inherited from class org.apache.bcel.classfile.Constant
clone, copy, equals, getComparator, getTag, hashCode, setComparator
-
Constructor Details
-
ConstantUtf8
Initialize from another object. -
ConstantUtf8
- Parameters:
bytes- Data
-
-
Method Details
-
getCachedInstance
-
getInstance
-
getInstance
- Throws:
IOException
-
accept
Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects. -
dump
Dump String in Utf8 format to file stream.- Specified by:
dumpin classConstant- Parameters:
file- Output file stream- Throws:
IOException
-
getBytes
- Returns:
- Data converted to string.
-
setBytes
Deprecated.- Parameters:
bytes- the raw bytes of this Utf-8
-
toString
-