Package 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`, `Java.Package` and `Java.ConstructorInvocation`.

## Field Summary

### Fields inherited from class org.codehaus.janino.Java.Located

`NOWHERE`

## Constructor Summary

Constructors
Constructor
Description
`Atom(Location location)`

## Method Summary

Modifier and Type
Method
Description
`abstract <R, EX extends Throwable>
R`
`accept(Visitor.AtomVisitor<R,EX> visitor)`
Invokes the "`visit...()`" method of `Visitor.AtomVisitor` for the concrete `Java.Atom` type.
`Java.Lvalue`
`toLvalue()`
`final Java.Lvalue`
`toLvalueOrCompileException()`
`Java.Rvalue`
`toRvalue()`
`final Java.Rvalue`
`toRvalueOrCompileException()`
`abstract String`
`toString()`
`Java.Type`
`toType()`
`final 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 Details

### Atom

public Atom(Location location)

## Method Details

### toType

@Nullable public Java.Type toType()

Returns:
  This atom, converted to `Java.Type`, or `null` if this atom is not a type

### toRvalue

@Nullable public Java.Rvalue toRvalue()

Returns:
  This atom, converted to `Java.Rvalue`, or `null` if this atom is not an rvalue

### toLvalue

@Nullable 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

@Nullable public abstract <R, EX extends Throwable> R accept(Visitor.AtomVisitor<R,EX> visitor) throws EX
Invokes the "`visit...()`" method of `Visitor.AtomVisitor` for the concrete `Java.Atom` type.

Throws:
  `EX`