|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.Member
org.multijava.util.classfile.FieldInfo
VMS 4.5: Fields Each field is described by this structure. Used to make up new field entries. Fields for a class can have an additional "ConstantValue" attribute associated them, which the java compiler uses to represent things like static final int blah = foo;
| Field Summary | |
protected AttributeList |
attributes
|
private AsciiConstant |
name
|
private AsciiConstant |
type
|
| Fields inherited from class org.multijava.util.classfile.Member |
|
| Constructor Summary | |
FieldInfo(DataInput in,
ConstantPool cp)
Constructs a field entry from a class file stream |
|
FieldInfo(short modifiers,
String name,
String type,
String generictype,
Object value,
boolean deprecated,
boolean synthetic)
Constructs a field entry |
|
| Method Summary | |
void |
addAttribute(Attribute attr)
Adds the given attribute attr to the attribute
list of this field. |
Object |
getConstantValue()
Returns the value of the this field |
String |
getGenericSignature()
|
String |
getName()
Returns the name of the this field |
String |
getSignature()
Returns the type of the this field |
void |
getSignature(String type)
Returns the type of the this field |
CUniverseTypeAnnotation |
getUniverseAnnotation()
Returns this field's universe annotation, or null if no annotation is present. |
boolean |
isDeprecated()
Returns true if the field is deprecated |
boolean |
isSynthetic()
Returns true if the field is synthetic |
(package private) void |
resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool |
void |
setConstantValue(Object value)
Sets the value of the this field |
void |
setDeprecated(boolean deprecated)
Sets the deprecated attribute of this field |
void |
setGenericSignature(String str)
|
void |
setName(String name)
Sets the name of the this field |
void |
setSynthetic(boolean synthetic)
Returns true if the field is synthetic |
(package private) void |
write(ConstantPool cp,
DataOutput out)
Write this class into the the file (out) getting data position from the constant pool |
| Methods inherited from class org.multijava.util.classfile.Member |
compareTo, equals, getModifiers, hashCode, setModifiers, toString |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
private AsciiConstant name
private AsciiConstant type
protected AttributeList attributes
| Constructor Detail |
public FieldInfo(short modifiers,
String name,
String type,
String generictype,
Object value,
boolean deprecated,
boolean synthetic)
modifiers - access permission to and properties of the fieldname - the name of the fieldtype - the type signaturevalue - the value of a constant field that must be
(explicitly or implicitly) staticdeprecated - is this field deprecated ?synthetic - is this field synthesized by the compiler ?
public FieldInfo(DataInput in,
ConstantPool cp)
throws IOException,
ClassFileFormatException
in - the stream to read fromcp - the constant pool
IOException - an io problem has occured
ClassFileFormatException - attempt to
write a bad classfile info| Method Detail |
public String getName()
public String getGenericSignature()
public void setGenericSignature(String str)
public void setName(String name)
public String getSignature()
public void getSignature(String type)
public Object getConstantValue()
public void setConstantValue(Object value)
public boolean isDeprecated()
public void setDeprecated(boolean deprecated)
public boolean isSynthetic()
public void setSynthetic(boolean synthetic)
public CUniverseTypeAnnotation getUniverseAnnotation()
public void addAttribute(Attribute attr)
attr to the attribute
list of this field.
void resolveConstants(ConstantPool cp)
throws ClassFileFormatException
cp - the constant pool for this class
ClassFileFormatException
void write(ConstantPool cp,
DataOutput out)
throws IOException,
ClassFileFormatException
cp - the constant pool that contain all dataout - the file where to write this object info
IOException - an io problem has occured
ClassFileFormatException - attempt to
write a bad classfile info
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||