Package org.codehaus.janino

# Class Java.Wildcard

java.lang.Object
org.codehaus.janino.Java.Wildcard

All Implemented Interfaces:
  `Java.TypeArgument`

Enclosing class:
  `Java`

public static class Java.Wildcard extends Object implements Java.TypeArgument
Representation of a JLS7 4.5.1 "wildcard".

## Field Summary

Fields
Modifier and Type
Field
Description
`final int`
`bounds`
The kind of bounds that this wildcard has.
`static final int`
`BOUNDS_EXTENDS`
Value for `bounds` indicating that this wildcard has "extends" bounds.
`static final int`
`BOUNDS_NONE`
Value for `bounds` indicating that this wildcard has no bounds; `referenceType` is irrelevant in this case.
`static final int`
`BOUNDS_SUPER`
Value for `bounds` indicating that this wildcard has "super" bounds.
`final Java.ReferenceType`
`referenceType`
The reference type of this wildcard's EXTENDS or SUPER bounds.

## Constructor Summary

Constructors
Constructor
Description
`Wildcard()`
`Wildcard(int bounds, Java.ReferenceType referenceType)`

## Method Summary

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

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### BOUNDS_NONE

public static final int BOUNDS_NONE
Value for `bounds` indicating that this wildcard has no bounds; `referenceType` is irrelevant in this case.

See Also:
  - Constant Field Values

### BOUNDS_EXTENDS

public static final int BOUNDS_EXTENDS
Value for `bounds` indicating that this wildcard has "extends" bounds.

See Also:
  - Constant Field Values

### BOUNDS_SUPER

public static final int BOUNDS_SUPER
Value for `bounds` indicating that this wildcard has "super" bounds.

See Also:
  - Constant Field Values

### bounds

public final int bounds
The kind of bounds that this wildcard has.

See Also:
  - `BOUNDS_NONE`
  - `BOUNDS_EXTENDS`
  - `BOUNDS_SUPER`

### referenceType

@Nullable public final Java.ReferenceType referenceType
The reference type of this wildcard's EXTENDS or SUPER bounds.

## Constructor Details

### Wildcard

public Wildcard()

### Wildcard

public Wildcard(int bounds, @Nullable Java.ReferenceType referenceType)

## Method Details

### setEnclosingScope

public void setEnclosingScope(Java.Scope enclosingScope)
Description copied from interface: `Java.TypeArgument`
Sets the enclosing scope for this type argument.

Specified by:
  `setEnclosingScope` in interface `Java.TypeArgument`

### accept

@Nullable public final <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`

### toString

public String toString()

Overrides:
  `toString` in class `Object`