Package classycle.classfile
Class RefConstant
java.lang.Object
classycle.classfile.Constant
classycle.classfile.RefConstant
- Direct Known Subclasses:
FieldRefConstant
,InterfaceMethodRefConstant
,MethodRefConstant
Abstract supper class of all reference constants.
- Author:
- Franz-Josef Elmer
-
Constructor Summary
ConstructorsConstructorDescriptionRefConstant
(Constant[] pool, int classIndex, int nameAndTypeIndex) Creates an instance for the specified class, name, and type. -
Method Summary
Modifier and TypeMethodDescriptionReturns the class constant.Returns the name-and-type constant.protected String
Pretty printing.Methods inherited from class classycle.classfile.Constant
extractConstantPool, getConstant
-
Constructor Details
-
RefConstant
Creates an instance for the specified class, name, and type.- Parameters:
pool
- Constant pool. Needed for resolving references.classIndex
- Index ofClassConstant
.nameAndTypeIndex
- Index ofNameAndTypeConstant
.
-
-
Method Details
-
getClassConstant
Returns the class constant. -
getNameAndType
Returns the name-and-type constant. -
toString
Pretty printing. Will be used by toString of the subclasses.
-