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
-
-
Constructor Summary
Constructors Constructor Description IField()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AccessgetAccess()abstract java.lang.ObjectgetConstantValue()Returns the value of the field if it is a compile-time constant value, i.e.IClassgetDeclaringIClass()Returns theIClassthat declares thisIClass.IMember.java.lang.StringgetDescriptor()abstract java.lang.StringgetName()abstract IClassgetType()abstract booleanisStatic()java.lang.StringtoString()
-
-
-
Method Detail
-
getAccess
public abstract Access getAccess()
- Specified by:
getAccessin interfaceIClass.IMember- Returns:
- One of
Access.PRIVATE,Access.PROTECTED,Access.DEFAULTandAccess.PUBLIC.
-
getDeclaringIClass
public IClass getDeclaringIClass()
Description copied from interface:IClass.IMemberReturns theIClassthat declares thisIClass.IMember.- Specified by:
getDeclaringIClassin interfaceIClass.IMember
-
isStatic
public abstract boolean isStatic()
-
getType
public abstract IClass getType() throws CompileException
- Throws:
CompileException
-
getName
public abstract java.lang.String getName()
-
getDescriptor
public java.lang.String getDescriptor() throws CompileException- Throws:
CompileException
-
getConstantValue
public abstract java.lang.Object getConstantValue() throws CompileExceptionReturns 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 (JLS2 15.28, bullet 12).- Throws:
CompileException
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-