Package org.codehaus.janino
Class IClass.IField
java.lang.Object
org.codehaus.janino.IClass.IField
- All Implemented Interfaces:
IClass.IMember
- Direct Known Subclasses:
ReflectionIClass.ReflectionIField
,UnitCompiler.SimpleIField
- Enclosing class:
- IClass
Representation of a field of this
IClass
.-
Constructor Details
-
IField
public IField()
-
-
Method Details
-
getAccess
- Specified by:
getAccess
in interfaceIClass.IMember
- Returns:
- One of
Access.PRIVATE
,Access.PROTECTED
,Access.DEFAULT
andAccess.PUBLIC
.
-
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
- Returns:
- The type of this field
- Throws:
CompileException
-
getName
- Returns:
- The name this field
-
getDescriptor
- Returns:
- The descriptor of this field
- Throws:
CompileException
-
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).- Throws:
CompileException
-
toString
-