Package de.inetsoftware.classparser
Class ConstantRef
- java.lang.Object
-
- de.inetsoftware.classparser.ConstantRef
-
- All Implemented Interfaces:
Member
- Direct Known Subclasses:
ConstantFieldRef
,ConstantInterfaceRef
,ConstantMethodRef
public abstract class ConstantRef extends java.lang.Object implements Member
A reference to an member that is described in the constant pool of a Java class.
-
-
Field Summary
Fields Modifier and Type Field Description private ConstantClass
constClass
private ConstantNameAndType
nameAndType
-
Constructor Summary
Constructors Constructor Description ConstantRef(ConstantClass constClass, ConstantNameAndType nameAndType)
Create a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getClassName()
The class name of the declaring class like "java/lang/Object".ConstantClass
getConstantClass()
java.lang.String
getName()
The simple name without packagejava.lang.String
getType()
Get the type of the method.
-
-
-
Field Detail
-
constClass
private final ConstantClass constClass
-
nameAndType
private final ConstantNameAndType nameAndType
-
-
Constructor Detail
-
ConstantRef
ConstantRef(ConstantClass constClass, ConstantNameAndType nameAndType)
Create a new instance.- Parameters:
constClass
- the class descriptionnameAndType
- the name and type description
-
-
Method Detail
-
getName
public java.lang.String getName()
The simple name without package
-
getClassName
public java.lang.String getClassName()
The class name of the declaring class like "java/lang/Object".- Specified by:
getClassName
in interfaceMember
- Returns:
- the class name
-
getType
public java.lang.String getType()
Get the type of the method. For example "(Ljava.lang.String;)I"
-
getConstantClass
public ConstantClass getConstantClass()
-
-