Web Site

org.codehaus.janino
Class UnitCompiler.SimpleIField

java.lang.Object
  extended by org.codehaus.janino.IClass.IField
      extended by org.codehaus.janino.UnitCompiler.SimpleIField
All Implemented Interfaces:
IClass.IMember
Enclosing class:
UnitCompiler

public static class UnitCompiler.SimpleIField
extends IClass.IField

Short-hand implementation of IClass.IField that implements a non-constant, non-static, package-accessible field.


Constructor Summary
UnitCompiler.SimpleIField(IClass declaringIClass, java.lang.String name, IClass type)
           
 
Method Summary
 Access getAccess()
           
 java.lang.Object getConstantValue()
          Returns the value of the field if it is a compile-time constant value, i.e.
 java.lang.String getName()
           
 IClass getType()
           
 boolean isStatic()
           
 
Methods inherited from class org.codehaus.janino.IClass.IField
getDeclaringIClass, getDescriptor, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnitCompiler.SimpleIField

public UnitCompiler.SimpleIField(IClass declaringIClass,
                                 java.lang.String name,
                                 IClass type)
Method Detail

getConstantValue

public java.lang.Object getConstantValue()
Description copied from class: IClass.IField
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).

Specified by:
getConstantValue in class IClass.IField

getName

public java.lang.String getName()
Specified by:
getName in class IClass.IField

getType

public IClass getType()
Specified by:
getType in class IClass.IField

isStatic

public boolean isStatic()
Specified by:
isStatic in class IClass.IField

getAccess

public Access getAccess()
Specified by:
getAccess in interface IClass.IMember
Specified by:
getAccess in class IClass.IField
Returns:
One of Access.PRIVATE, Access.PROTECTED, Access.DEFAULT and Access.PUBLIC.

Web Site