Package 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 java.lang.Object implements IClass.IMember
Representation of a field of thisIClass
.
-
-
Constructor Summary
Constructors Constructor Description IField()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Access
getAccess()
abstract java.lang.Object
getConstantValue()
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).IClass
getDeclaringIClass()
java.lang.String
getDescriptor()
abstract java.lang.String
getName()
abstract IClass
getType()
abstract boolean
isStatic()
java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.codehaus.janino.IClass.IMember
getAnnotations
-
-
-
-
Method Detail
-
getAccess
public abstract Access getAccess()
- Specified by:
getAccess
in interfaceIClass.IMember
- Returns:
- One of
Access.PRIVATE
,Access.PROTECTED
,Access.DEFAULT
andAccess.PUBLIC
.
-
getDeclaringIClass
public IClass getDeclaringIClass()
- Specified by:
getDeclaringIClass
in interfaceIClass.IMember
- Returns:
- The
IClass
that declares thisIClass.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 java.lang.String getName()
- Returns:
- The name this field
-
getDescriptor
public java.lang.String getDescriptor() throws CompileException
- Returns:
- The descriptor of this field
- Throws:
CompileException
-
getConstantValue
@Nullable public abstract java.lang.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 java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-