Returns the element corresponding to a type.
The type may be a {@code DeclaredType} or {@code TypeVariable}.
Returns {@code null} if the type is not one with a
corresponding element.
Returns the type of an element when that element is viewed as
a member of, or otherwise directly contained by, a given type.
For example,
when viewed as a member of the parameterized type {@code Set},
the {@code Set.add} method is an {@code ExecutableType}
whose parameter is of type {@code String}.
Returns the type corresponding to a type element and
actual type arguments.
Given the type element for {@code Set} and the type mirror
for {@code String},
for example, this method may be used to get the
parameterized type {@code Set}.
The number of type arguments must either equal the
number of the type element's formal type parameters, or must be
zero. If zero, and if the type element is generic,
then the type element's raw type is returned.
If a parameterized type is being returned, its type element
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
#getDeclaredType(DeclaredType, TypeElement, TypeMirror...) .
Returns the type corresponding to a type element
and actual type arguments, given a
{@linkplain DeclaredType#getEnclosingType() containing type}
of which it is a member.
The parameterized type {@code Outer.Inner},
for example, may be constructed by first using
#getDeclaredType(TypeElement, 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 {@code typeElem}'s formal type parameters.
If it is not parameterized or if it is {@code null}, this method is
equivalent to {@code getDeclaredType(typeElem, typeArgs)}.
Returns a pseudo-type used where no actual type is appropriate.
The kind of type to return may be either
VOID or NONE .
For packages, use
Elements#getPackageElement(CharSequence) {@code .asType()}
instead.
Tests whether two {@code TypeMirror} objects represent the same type.
Caveat: if either of the arguments to this method represents a
wildcard, this method will return false. As a consequence, a wildcard
is not the same type as itself. This might be surprising at first,
but makes sense once you consider that an example like this must be
rejected by the compiler: