org.codehaus.janino
Class Java.Atom
java.lang.Object
org.codehaus.janino.Java.Located
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.
Java.Atom
public Java.Atom(Location location)
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.