base types (tags: BYTE, CHAR, SHORT, INT, LONG, FLOAT, DOUBLE, BOOLEAN), type `void' (tag: VOID), the bottom type (tag: BOT), the missing type (tag: NONE).
The behavior of the following types is defined in subclasses, which are all static inner classes of this class:
class types (tag: CLASS, class: ClassType), array types (tag: ARRAY, class: ArrayType), method types (tag: METHOD, class: MethodType), package types (tag: PACKAGE, class: PackageType), type variables (tag: TYPEVAR, class: TypeVar), type arguments (tag: WILDCARD, class: WildcardType), generic method types (tag: FORALL, class: ForAll), the error type (tag: ERROR, class: ErrorType).
This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
TypeTag
| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| pack-priv static class | |
| public static class | Type.
A captured type variable comes from wildcards which can have both upper and lower bound. |
| public static class | |
| public abstract static class | |
| public static class | |
| public static class | |
| public static class | Type.
The type of a generic method type. |
| public static class | |
| public static class | Type.
Represents NONE. |
| public static class | |
| public static class | Type.
Represents VOID. |
| public static class | |
| public static class | |
| public static class | |
| public abstract static class | Type.
A subclass of |
| public static class | |
| public static class | Type.
A class for inference variables, for use during method/diamond type inference. |
| public static class | |
| public static interface | Type.
the return type of the operation implemented by this
visitor; use Void if no return type is needed. R, the type of the second argument (the first being the
type itself) of the operation implemented by this visitor; use
Void if a second argument is not needed. S>A visitor for types. |
| public static class |
| Modifier and Type | Field and Description |
|---|---|
| protected final List | metadata
Type metadata, Should be |
| public static boolean | moreInfo
If this switch is turned on, the names of type variables and anonymous classes are printed with hashcodes appended. |
| public static final Type. | noType
Constant type: no type at all. |
| public static final Type. | recoveryType
Constant type: special type to be used during recovery of deferred expressions. |
| private static final Types. | stripMetadata
Note this visitor only needs to handle cases where 'contained' types can be annotated. |
| public static final Type. | stuckType
Constant type: special type to be used for marking stuck trees. |
| public Symbol. | tsym
The defining class / interface / package / type variable. |
| Access | Constructor and Description |
|---|---|
| public | Type(Symbol.
Define a type given its tag, type symbol, and type annotations |
| Modifier and Type | Method and Description |
|---|---|
| public <R, S> R | |
| public <R, P> R | accept(TypeVisitor<R, P> v, P p)
Implements javax. Applies a visitor to this type. |
| public Type | |
| public List | allparams()
Return all parameters of this type and all its outer types in order outer (first) to inner (last). |
| public Type | |
| protected void | |
| protected void | |
| public String | |
| public Symbol. | |
| public Type. | |
| public Type | |
| public static List | |
| protected Type | cloneWithMetadata(List<TypeMetadata> metadata)
Create a new copy of this type but with the specified TypeMetadata. |
| public void | |
| public Type | |
| public Object | Returns: the constant value attribute of this typeThe constant value of this type, null if this type does not have a constant value attribute. |
| public boolean | |
| public static boolean | |
| public boolean | |
| public static boolean | |
| public Type | dropMetadata(Class<? extends TypeMetadata> metadataClass)
Create a new copy of this type but without the specified type metadata. |
| public boolean | equals(Object t)
Overrides java. Implements javax. Override this method with care. |
| public boolean | |
| public static List | |
| public List | getAnnotationMirrors()
Implements abstract com. Implements javax. Returns the annotations that are directly present on this construct. |
| public Type | |
| public TypeKind | |
| public Type | |
| public List | |
| public <M extends TypeMetadata> M | getMetadata(Class<M> metadataClass)
Get the type metadata of the given kind associated with this type (if any). |
| public <M extends TypeMetadata, Z> Z | getMetadata(Class<M> metadataClass, Function<M, Z> metadataFunc, Z defaultValue)
Get the type metadata of the given kind associated with this type (if any), and apply the provided mapping function. |
| public Type | |
| public static List | |
| public Type | |
| public List | |
| public Type | |
| public Type | |
| public abstract TypeTag | |
| public List | |
| public List | |
| public Type | |
| public int | hashCode()
Overrides java. Implements javax. Obeys the general contract of |
| public boolean | |
| public boolean | |
| public boolean | isCompound()
A compound type is a special class type whose supertypes are used to store a list of component types. |
| public boolean | |
| public static boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public boolean | |
| public <Z> Type | map(Types.
map a type function over all immediate descendants of this type |
| public <Z> Type | map(Types.
map a type function over all immediate descendants of this type (no arg version) |
| protected boolean | |
| public Object | poolKey(Types types)
Overrides default com. The constant pool entry key. |
| public int | |
| public Type | |
| public String | |
| public Type | |
| public Type | stripMetadataIfNeeded()
Strip all metadata associated with this type - this could return a new clone of the type. |
| public String | toString()
Overrides java. Implements javax. The Java source which this type represents. |
| public static String | |
| protected Type | |
| public Type |