Methods Summary |
---|
public com.sun.mirror.type.ArrayType | getArrayType(com.sun.mirror.type.TypeMirror componentType)Returns an array type with the specified component type.
|
public com.sun.mirror.type.DeclaredType | getDeclaredType(com.sun.mirror.type.DeclaredType containing, com.sun.mirror.declaration.TypeDeclaration decl, com.sun.mirror.type.TypeMirror typeArgs)Returns the type corresponding to a type declaration
and actual arguments, given a
{@linkplain DeclaredType#getContainingType() containing type}
of which it is a member.
The parameterized type {@code Outer.Inner},
for example, may be constructed by first using
{@link #getDeclaredType(TypeDeclaration, TypeMirror...)}
to get the type {@code Outer}, and then invoking
this method.
If the containing type is a parameterized type,
the number of type arguments must equal the
number of the declaration's formal type parameters.
If it is not parameterized or if it is null, this method is
equivalent to getDeclaredType(decl, typeArgs).
|
public com.sun.mirror.type.DeclaredType | getDeclaredType(com.sun.mirror.declaration.TypeDeclaration decl, com.sun.mirror.type.TypeMirror typeArgs)Returns the type corresponding to a type declaration and
actual type arguments.
Given the declaration for String, for example, this
method may be used to get the String type. It may
then be invoked a second time, with the declaration for Set,
to make the parameterized type {@code Set}.
The number of type arguments must either equal the
number of the declaration's formal type parameters, or must be
zero. If zero, and if the declaration is generic,
then the declaration's raw type is returned.
If a parameterized type is being returned, its declaration
must not be contained within a generic outer class.
The parameterized type {@code Outer.Inner},
for example, may be constructed by first using this
method to get the type {@code Outer}, and then invoking
{@link #getDeclaredType(DeclaredType, TypeDeclaration, TypeMirror...)}.
|
public com.sun.mirror.type.TypeMirror | getErasure(com.sun.mirror.type.TypeMirror t)Returns the erasure of a type.
|
public com.sun.mirror.type.PrimitiveType | getPrimitiveType(com.sun.mirror.type.PrimitiveType$Kind kind)Returns a primitive type.
|
public com.sun.mirror.type.TypeVariable | getTypeVariable(com.sun.mirror.declaration.TypeParameterDeclaration tparam)Returns the type variable declared by a type parameter.
|
public com.sun.mirror.type.VoidType | getVoidType()Returns the pseudo-type representing the type of void.
|
public com.sun.mirror.type.WildcardType | getWildcardType(java.util.Collection upperBounds, java.util.Collection lowerBounds)Returns a new wildcard.
Either the wildcards's upper bounds or lower bounds may be
specified, or neither, but not both.
|
public boolean | isAssignable(com.sun.mirror.type.TypeMirror t1, com.sun.mirror.type.TypeMirror t2)Tests whether one type is assignable to another.
|
public boolean | isSubtype(com.sun.mirror.type.TypeMirror t1, com.sun.mirror.type.TypeMirror t2)Tests whether one type is a subtype of the another.
Any type is considered to be a subtype of itself.
|