janino.net

org.codehaus.janino
Class Java.Atom

java.lang.Object
  extended by org.codehaus.janino.Java.Located
      extended by org.codehaus.janino.Java.Atom
All Implemented Interfaces:
Java.Locatable
Direct Known Subclasses:
Java.ConstructorInvocation, Java.Package, Java.Rvalue, Java.Type
Enclosing class:
Java

public abstract static class Java.Atom
extends Java.Located

Abstract base class for Java.Type, Java.Rvalue and Java.Lvalue.


Field Summary
 
Fields inherited from class org.codehaus.janino.Java.Located
NOWHERE
 
Constructor Summary
Java.Atom(Location location)
           
 
Method Summary
abstract  void accept(Visitor.AtomVisitor visitor)
          Invokes the 'visit...()' method of Visitor.AtomVisitor for the concrete Java.Atom type.
 Java.Lvalue toLvalue()
           
 Java.Lvalue toLvalueOrCompileException()
           
 Java.Rvalue toRvalue()
           
 Java.Rvalue toRvalueOrCompileException()
           
abstract  String toString()
           
 Java.Type toType()
           
 Java.Type toTypeOrCompileException()
           
 
Methods inherited from class org.codehaus.janino.Java.Located
getLocation, throwCompileException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Java.Atom

public Java.Atom(Location location)
Method Detail

toType

public Java.Type toType()
Returns:
This atom, converted to Java.Type, or null if this atom is not a type

toRvalue

public Java.Rvalue toRvalue()
Returns:
This atom, converted to Java.Rvalue, or null if this atom is not an rvalue

toLvalue

public Java.Lvalue toLvalue()
Returns:
This atom, converted to Java.Lvalue, or null if this atom is not an lvalue

toString

public abstract String toString()
Overrides:
toString in class Object

toTypeOrCompileException

public final Java.Type toTypeOrCompileException()
                                         throws CompileException
Returns:
This atom, converted to Java.Type
Throws:
CompileException - This atom is not a Java.Type

toRvalueOrCompileException

public final Java.Rvalue toRvalueOrCompileException()
                                             throws CompileException
Returns:
This atom, converted to an Java.Rvalue
Throws:
CompileException - This atom is not an Java.Rvalue

toLvalueOrCompileException

public final Java.Lvalue toLvalueOrCompileException()
                                             throws CompileException
Returns:
This atom, converted to an Java.Lvalue
Throws:
CompileException - This atom is not a Java.Lvalue

accept

public abstract void accept(Visitor.AtomVisitor visitor)
Invokes the 'visit...()' method of Visitor.AtomVisitor for the concrete Java.Atom type.


janino.net