public class StringConstant extends Constant
| Modifier and Type | Field and Description |
|---|---|
Clazz |
javaLangStringClass
An extra field pointing to the java.lang.String Clazz object.
|
Clazz |
referencedClass
An extra field pointing to the referenced Clazz object, if this
string is being used in Class.forName(), .class, or
Class.getDeclaredField/Method constructs.
|
Member |
referencedMember
An extra field pointing to the referenced Member object, if this
string is being used in Class.getDeclaredField/Method constructs.
|
int |
u2stringIndex |
visitorInfo| Constructor and Description |
|---|
StringConstant()
Creates an uninitialized StringConstant.
|
StringConstant(int u2stringIndex,
Clazz referencedClass,
Member referenceMember)
Creates a new StringConstant with the given string index.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(Clazz clazz,
ConstantVisitor constantVisitor)
Accepts the given visitor.
|
String |
getString(Clazz clazz)
Returns the string value.
|
int |
getTag()
Returns the constant pool info tag that specifies the entry type.
|
void |
referencedClassAccept(ClassVisitor classVisitor)
Lets the referenced class accept the given visitor.
|
void |
referencedMemberAccept(MemberVisitor memberVisitor)
Lets the referenced member accept the given visitor.
|
getVisitorInfo, setVisitorInfopublic int u2stringIndex
public Clazz referencedClass
DynamicClassReferenceInitializer or by the DynamicMemberReferenceInitializer.public Member referencedMember
DynamicMemberReferenceInitializer.public Clazz javaLangStringClass
ClassReferenceInitializer..public StringConstant()
public StringConstant(int u2stringIndex,
Clazz referencedClass,
Member referenceMember)
u2stringIndex - the index of the string in the constant pool.referencedClass - the referenced class, if any.referenceMember - the referenced class member, if any.public int getTag()
Constantpublic void accept(Clazz clazz, ConstantVisitor constantVisitor)
Constantpublic void referencedClassAccept(ClassVisitor classVisitor)
public void referencedMemberAccept(MemberVisitor memberVisitor)
Copyright © 2015. All Rights Reserved.