Package org.codehaus.janino
Class UnitCompiler.SimpleIField
- java.lang.Object
-
- org.codehaus.janino.IClass.IField
-
- org.codehaus.janino.UnitCompiler.SimpleIField
-
- All Implemented Interfaces:
IClass.IMember
- Enclosing class:
- UnitCompiler
public static class UnitCompiler.SimpleIField extends IClass.IField
Short-hand implementation ofIClass.IFieldthat implements a non-constant, non-static, package-accessible field.
-
-
Constructor Summary
Constructors Constructor Description SimpleIField(IClass declaringIClass, java.lang.String name, IClass type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AccessgetAccess()java.lang.ObjectgetConstantValue()Returns the value of the field if it is a compile-time constant value, i.e.java.lang.StringgetName()IClassgetType()booleanisStatic()-
Methods inherited from class org.codehaus.janino.IClass.IField
getDeclaringIClass, getDescriptor, toString
-
-
-
-
Method Detail
-
getConstantValue
public java.lang.Object getConstantValue()
Description copied from class:IClass.IFieldReturns 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).- Specified by:
getConstantValuein classIClass.IField
-
getName
public java.lang.String getName()
- Specified by:
getNamein classIClass.IField
-
getType
public IClass getType()
- Specified by:
getTypein classIClass.IField
-
isStatic
public boolean isStatic()
- Specified by:
isStaticin classIClass.IField
-
getAccess
public Access getAccess()
- Specified by:
getAccessin interfaceIClass.IMember- Specified by:
getAccessin classIClass.IField- Returns:
- One of
Access.PRIVATE,Access.PROTECTED,Access.DEFAULTandAccess.PUBLIC.
-
-