Package org.codehaus.janino

# Class Java.ReferenceType

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

All Implemented Interfaces:
  `Java.Locatable`, `Java.TypeArgument`

Enclosing class:
  `Java`

public static final class Java.ReferenceType extends Java.Type implements Java.TypeArgument
Representation of a JLS7 4.3 reference type.

## Field Summary

Fields
Modifier and Type
Field
Description
`final Java.Annotation[]`
`annotations`
The "type annotations" of this type, see JLS9, 9.7.4.
`final String[]`
`identifiers`
The list of (dot-separated) identifiers that pose the reference type, e.g.
`final Java.TypeArgument[]`
`typeArguments`
The optional type arguments of the reference type.

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

`NOWHERE`

## Constructor Summary

Constructors
Constructor
Description
`ReferenceType(Location location, Java.Annotation[] annotations, String[] identifiers, Java.TypeArgument[] typeArguments)`

## Method Summary

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

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

`getEnclosingScope, toType`

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

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

## Field Details

### annotations

public final Java.Annotation[] annotations
The "type annotations" of this type, see JLS9, 9.7.4.

### identifiers

public final String[] identifiers
The list of (dot-separated) identifiers that pose the reference type, e.g. "java", "util", "Map".

### typeArguments

@Nullable public final Java.TypeArgument[] typeArguments
The optional type arguments of the reference type.

## Constructor Details

### ReferenceType

public ReferenceType(Location location, Java.Annotation[] annotations, String[] identifiers, @Nullable Java.TypeArgument[] typeArguments)

## Method Details

### setEnclosingScope

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

Specified by:
  `setEnclosingScope` in interface `Java.TypeArgument`
Overrides:
  `setEnclosingScope` in class `Java.Type`

### toString

public String toString()

Specified by:
  `toString` in class `Java.Atom`

### accept

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

Specified by:
  `accept` in class `Java.Atom`
Throws:
  `EX`

### accept

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

Specified by:
  `accept` in class `Java.Type`
Throws:
  `EX`

### accept

@Nullable public <R, EX extends Throwable> R accept(Visitor.TypeArgumentVisitor<R,EX> visitor) throws EX
Description copied from interface: `Java.TypeArgument`
Invokes the "`visit...()`" method of `Visitor.TypeArgumentVisitor` for the concrete `Java.TypeArgument` type.

Specified by:
  `accept` in interface `Java.TypeArgument`
Throws:
  `EX`