Package classycle.classfile
Class ClassConstant
- java.lang.Object
-
- classycle.classfile.Constant
-
- classycle.classfile.ClassConstant
-
public class ClassConstant extends Constant
Class constant. Refers to an instance ofUTF8Constant
which holds the fully qualifies class name.- Author:
- Franz-Josef Elmer
-
-
Constructor Summary
Constructors Constructor Description ClassConstant(Constant[] pool, int nameIndex)
Creates an instance for the specified index refering anUTF8Constant
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getName()
Returns the fully-qualified class name.java.lang.String
toString()
Returns the constant type and the class name.-
Methods inherited from class classycle.classfile.Constant
extractConstantPool, getConstant
-
-
-
-
Constructor Detail
-
ClassConstant
public ClassConstant(Constant[] pool, int nameIndex)
Creates an instance for the specified index refering anUTF8Constant
.- Parameters:
pool
- Pool of allConstants
.nameIndex
- Index into pool.
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the fully-qualified class name. In the case of an object array only the class name of the object is returned.- Returns:
- fully-qualified class name in standard notation with '.'.
-
toString
public java.lang.String toString()
Returns the constant type and the class name.- Overrides:
toString
in classjava.lang.Object
-
-