org.codehaus.janino
Class IClass.IField
java.lang.Object
org.codehaus.janino.IClass.IField
- All Implemented Interfaces:
- IClass.IMember
- Direct Known Subclasses:
- UnitCompiler.SimpleIField
- Enclosing class:
- IClass
public abstract class IClass.IField
- extends Object
- implements IClass.IMember
Representation of a field of this IClass.
IClass.IField
public IClass.IField()
getAccess
public abstract Access getAccess()
- Specified by:
getAccess in interface IClass.IMember
- Returns:
- One of
Access.PRIVATE, Access.PROTECTED,
Access.DEFAULT and Access.PUBLIC.
getDeclaringIClass
public IClass getDeclaringIClass()
- Specified by:
getDeclaringIClass in interface IClass.IMember
- Returns:
- The
IClass that declares this IClass.IMember
isStatic
public abstract boolean isStatic()
- Returns:
- Whether this field is STATIC
getType
public abstract IClass getType()
throws CompileException
- Returns:
- The type of this field
- Throws:
CompileException
getName
public abstract String getName()
- Returns:
- The name this field
getDescriptor
public String getDescriptor()
throws CompileException
- Returns:
- The descriptor of this field
- Throws:
CompileException
getConstantValue
public abstract Object getConstantValue()
throws CompileException
- Returns the value of the field if it is a compile-time constant value, i.e. the field is FINAL and its
initializer is a constant expression (JLS7 15.28, bullet 12).
- Throws:
CompileException
toString
public String toString()
- Overrides:
toString in class Object