|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfr.umlv.corosol.classfile.constant.impl.AbstractJConstant
fr.umlv.corosol.classfile.constant.impl.DefaultJConstantFieldref
public class DefaultJConstantFieldref
The default implementation of the fr.umlv.corosol.classfile.JConstantFieldref interface.
| Field Summary |
|---|
| Fields inherited from interface fr.umlv.corosol.classfile.constant.JConstant |
|---|
CONSTANT_CLASS, CONSTANT_DOUBLE, CONSTANT_FIELDREF, CONSTANT_FLOAT, CONSTANT_INTEGER, CONSTANT_INTERFACE_METHODREF, CONSTANT_LONG, CONSTANT_METHODREF, CONSTANT_NAME_AND_TYPE, CONSTANT_STRING, CONSTANT_UTF8 |
| Constructor Summary | |
|---|---|
DefaultJConstantFieldref()
Default constructor. |
|
DefaultJConstantFieldref(JConstantPool cpool,
int classIndex,
int nameAndTypeIndex)
Creates a new Constant_Fieldref_info entry. |
|
| Method Summary | |
|---|---|
int |
getClassIndex()
Returns the index of a CONSTANT_Class_info entry representing a valid fully qualified class or interface name. |
java.lang.String |
getClassName()
Returns the fully qualified class or interface name. |
java.lang.String |
getDescriptor()
Returns a field descriptor. |
java.lang.String |
getName()
Returns a field name. |
int |
getNameAndTypeIndex()
Returns the index of a CONSTANT_NameAndType_info entry representing the name and the descriptor of a field. |
JField |
getResolvedField()
|
boolean |
isResolved()
|
void |
readItem(JClassFileInput in)
Extracts the data of this constant pool entry via the specified input stream. |
void |
setClassIndex(int classIndex)
Sets the index of a CONSTANT_Class_info entry representing a valid fully qualified class or interface name. |
void |
setNameAndTypeIndex(int nameAndTypeIndex)
Sets the index of a CONSTANT_NameAndType_info entry representing the name and the descriptor of a field. |
void |
setResolvedField(JField field)
|
java.lang.String |
toString()
Returns a string representation of this constant pool entry. |
void |
writeItem(JClassFileOutput out)
Writes the data of this constant pool entry to a classfile via the specified output stream. |
| Methods inherited from class fr.umlv.corosol.classfile.constant.impl.AbstractJConstant |
|---|
getConstantPool, getLength, getTag, setConstantPool |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface fr.umlv.corosol.classfile.constant.JConstant |
|---|
getLength, getTag |
| Methods inherited from interface fr.umlv.corosol.classfile.JClassFileItem |
|---|
getConstantPool, setConstantPool |
| Constructor Detail |
|---|
public DefaultJConstantFieldref()
public DefaultJConstantFieldref(JConstantPool cpool,
int classIndex,
int nameAndTypeIndex)
cpool - the constant poolclassIndex - an index of a Constant_Class_info entrynameAndTypeIndex - an index of a Constant_NameAndType_info entry| Method Detail |
|---|
public java.lang.String getClassName()
getClassName in interface JConstantFieldrefpublic java.lang.String getName()
getName in interface JConstantFieldrefpublic java.lang.String getDescriptor()
getDescriptor in interface JConstantFieldrefpublic int getClassIndex()
getClassIndex in interface JConstantFieldrefpublic int getNameAndTypeIndex()
getNameAndTypeIndex in interface JConstantFieldrefpublic void setClassIndex(int classIndex)
setClassIndex in interface JConstantFieldrefclassIndex - an index of a constant pool entry representing the
name of the declaring class or interface of a fieldpublic void setNameAndTypeIndex(int nameAndTypeIndex)
setNameAndTypeIndex in interface JConstantFieldrefnameAndTypeIndex - an index of a constant pool entry representing
the name and the descriptor of a field
public void readItem(JClassFileInput in)
throws java.io.IOException
readItem in interface JClassFileItemin - a class file input stream
java.io.IOException - if an I/O error occurs when
reading the datas of this constant pool entry
public void writeItem(JClassFileOutput out)
throws java.io.IOException
writeItem in interface JClassFileItemout - a class file output stream
java.io.IOException - if an I/O error occurs when
writing into the classfilepublic java.lang.String toString()
toString in interface JConstanttoString in class AbstractJConstantpublic JField getResolvedField()
getResolvedField in interface JConstantFieldrefpublic void setResolvedField(JField field)
setResolvedField in interface JConstantFieldrefpublic boolean isResolved()
isResolved in interface JConstantFieldref
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||