Package org.codehaus.janino

# Class Java.Type

java.lang.Object
org.codehaus.janino.Java.Located
org.codehaus.janino.Java.Atom
org.codehaus.janino.Java.Type

All Implemented Interfaces:
  `Java.Locatable`

Direct Known Subclasses:
  `Java.ArrayType`, `Java.PrimitiveType`, `Java.ReferenceType`, `Java.RvalueMemberType`, `Java.SimpleType`

Enclosing class:
  `Java`

public abstract static class Java.Type extends Java.Atom
Representation of a Java type.

## Field Summary

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

`NOWHERE`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`Type(Location location)`

## Method Summary

Modifier and Type
Method
Description
`abstract <R, EX extends Throwable>
R`
`accept(Visitor.TypeVisitor<R,EX> visitor)`
Invokes the "`visit...()`" method of `Visitor.TypeVisitor` for the concrete `Java.Type` type.
`Java.Scope`
`getEnclosingScope()`
`void`
`setEnclosingScope(Java.Scope enclosingScope)`
Sets the enclosing scope for this object and all subordinate `Java.Type` objects.
`Java.Type`
`toType()`

### Methods inherited from class org.codehaus.janino.Java.Atom

`accept, toLvalue, toLvalueOrCompileException, toRvalue, toRvalueOrCompileException, toString, 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

### Type

protected Type(Location location)

## Method Details

### setEnclosingScope

public void setEnclosingScope(Java.Scope enclosingScope)
Sets the enclosing scope for this object and all subordinate `Java.Type` objects.

### getEnclosingScope

public Java.Scope getEnclosingScope()

Returns:
  The enclosing scope (as previously set by `setEnclosingScope(Java.Scope)`)

### toType

public Java.Type toType()

Overrides:
  `toType` in class `Java.Atom`
Returns:
  This atom, converted to `Java.Type`, or `null` if this atom is not a type

### accept

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

Throws:
  `EX`