|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.classfile.FieldReference
edu.rit.classfile.FieldDescription
edu.rit.classfile.SynthesizedFieldDescription
edu.rit.classfile.SynthesizedClassFieldDescription
public class SynthesizedClassFieldDescription
Class SynthesizedInterfacefieldDescription is used to synthesize a field description for some actual field that is part of a class. To synthesize a class field:
In the documentation below, the term "described field" means "the synthesized class field described by this synthesized class field description object."
To synthesize a class constant field, see class SynthesizedClassConstantFieldDescription
. To synthesize an interface field,
see class SynthesizedInterfaceFieldDescription
.
Constructor Summary | |
---|---|
SynthesizedClassFieldDescription(SynthesizedClassDescription theClassDescription,
String theFieldName,
TypeReference theFieldType)
Construct a new synthesized class field description object with the given class, field name, and field type. |
Method Summary | |
---|---|
void |
setFinal()
Specify that the described field is final and is not volatile, that is, may not be changed after initialization and can be cached. |
void |
setNonFinalNonVolatile()
Specify that the described field is not final and is not volatile, that is, may be changed after initialization and can be cached. |
void |
setPackageScoped()
Specify that the described field has default access (also known as package scoped), that is, may be accessed only from inside its defining package or inside its defining class. |
void |
setPrivate()
Specify that the described field is private, that is, may be accessed only from inside its defining class. |
void |
setProtected()
Specify that the described field is protected, that is, may be accessed only from inside its defining package, inside its defining class, or inside subclasses of its defining class. |
void |
setPublic()
Specify that the described field is public, that is, may be accessed from inside and outside its defining package. |
void |
setStatic(boolean isStatic)
Specify whether the described field is static. |
void |
setTransient(boolean isTransient)
Specify whether the described field is transient, that is, not written or read by a persistent object manager. |
void |
setVolatile()
Specify that the described field is not final and is volatile, that is, may be changed after initialization and cannot be cached. |
Methods inherited from class edu.rit.classfile.FieldDescription |
---|
getConstantValue, isFinal, isPackageScoped, isPrivate, isProtected, isPublic, isStatic, isTransient, isVolatile |
Methods inherited from class edu.rit.classfile.FieldReference |
---|
equals, getClassReference, getFieldDescriptor, getFieldName, getFieldType, hashCode, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SynthesizedClassFieldDescription(SynthesizedClassDescription theClassDescription, String theFieldName, TypeReference theFieldType) throws ListFullException
theClassDescription
- Class containing this field.theFieldName
- Field name.theFieldType
- Field type.
NullPointerException
- (unchecked exception) Thrown if theClassDescription is null,
theFieldName is null, or theFieldType is null.
IllegalArgumentException
- (unchecked exception) Thrown if theFieldName is zero length.
ListFullException
- Thrown if theClassDescription's field list is full (i.e.,
contains 65535 fields).Method Detail |
---|
public void setPublic()
public void setPrivate()
public void setProtected()
public void setPackageScoped()
public void setStatic(boolean isStatic)
isStatic
- True if the described field is static, false otherwise.public void setNonFinalNonVolatile()
public void setFinal()
public void setVolatile()
public void setTransient(boolean isTransient)
isTransient
- True if the described field is transient, false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |