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 Access
getAccess()
abstract java.lang.Object
getConstantValue()
Returns the value of the field if it is a compile-time constant value, i.e.IClass
getDeclaringIClass()
Returns theIClass
that declares thisIClass.IMember
.java.lang.String
getDescriptor()
abstract java.lang.String
getName()
abstract IClass
getType()
abstract boolean
isStatic()
java.lang.String
toString()
-
-
-
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()
Description copied from interface:IClass.IMember
Returns theIClass
that declares thisIClass.IMember
.- Specified by:
getDeclaringIClass
in 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 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 (JLS2 15.28, bullet 12).- Throws:
CompileException
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-