Uses of Interface
javax.lang.model.type.TypeMirror
Package
Description
Interfaces used to model elements of the Java programming language.
Interfaces used to model Java programming language types.
Utilities to assist in the processing of
program elements and
types.
-
Uses of TypeMirror in javax.lang.model.element
Modifier and TypeMethodDescriptionElement.asType()
Returns the type defined by this element.ExecutableElement.asType()
Returns the executable type defined by this executable element.ModuleElement.asType()
Returns a pseudo-type for this module.PackageElement.asType()
Returns a pseudo-type for this package.TypeElement.asType()
Returns the type defined by this class or interface element, returning the prototypical type for an element representing a generic type.TypeParameterElement.asType()
Returns the type variable corresponding to this type parameter element.VariableElement.asType()
Returns the type of this variable.ExecutableElement.getReceiverType()
ExecutableElement.getReturnType()
Returns the return type of this executable.TypeElement.getSuperclass()
Returns the direct superclass of this class or interface element.Modifier and TypeMethodDescriptionList<? extends TypeMirror>
TypeParameterElement.getBounds()
Returns the bounds of this type parameter.List<? extends TypeMirror>
TypeElement.getInterfaces()
Returns the interface types directly implemented by this class or extended by this interface.default List<? extends TypeMirror>
TypeElement.getPermittedSubclasses()
Returns the permitted classes of this class or interface element in declaration order.List<? extends TypeMirror>
ExecutableElement.getThrownTypes()
Returns the exceptions and other throwables listed in this method or constructor'sthrows
clause in declaration order.Modifier and TypeMethodDescriptionAnnotationValueVisitor.visitType
(TypeMirror t, P p) Visits a type value in an annotation. -
Uses of TypeMirror in javax.lang.model.type
Modifier and TypeInterfaceDescriptioninterface
Represents an array type.interface
Represents a declared type, either a class type or an interface type.interface
Represents a class or interface type that cannot be properly modeled.interface
Represents the type of an executable.interface
Represents an intersection type.interface
A pseudo-type used where no actual type is appropriate.interface
Represents the null type.interface
Represents a primitive type.interface
Represents a reference type.interface
Represents a type variable.interface
Represents a union type.interface
Represents a wildcard type argument.Modifier and TypeMethodDescriptionArrayType.getComponentType()
Returns the component type of this array type.DeclaredType.getEnclosingType()
Returns the type of the innermost enclosing instance or aNoType
of kindNONE
if there is no enclosing instance.WildcardType.getExtendsBound()
Returns the upper bound of this wildcard.TypeVariable.getLowerBound()
Returns the lower bound of this type variable.ExecutableType.getReceiverType()
ExecutableType.getReturnType()
Returns the return type of this executable.WildcardType.getSuperBound()
Returns the lower bound of this wildcard.MirroredTypeException.getTypeMirror()
Returns the type mirror corresponding to the type being accessed.UnknownTypeException.getUnknownType()
Returns the unknown type.TypeVariable.getUpperBound()
Returns the upper bound of this type variable.Modifier and TypeMethodDescriptionList<? extends TypeMirror>
UnionType.getAlternatives()
Returns the alternatives comprising this union type.List<? extends TypeMirror>
IntersectionType.getBounds()
Returns the bounds comprising this intersection type.List<? extends TypeMirror>
ExecutableType.getParameterTypes()
Returns the types of this executable's formal parameters.List<? extends TypeMirror>
ExecutableType.getThrownTypes()
Returns the exceptions and other throwables listed in this executable'sthrows
clause.List<? extends TypeMirror>
DeclaredType.getTypeArguments()
Returns the actual type arguments of this type.List<? extends TypeMirror>
MirroredTypesException.getTypeMirrors()
Returns the type mirrors corresponding to the types being accessed.Modifier and TypeMethodDescriptiondefault R
TypeVisitor.visit
(TypeMirror t) A convenience method equivalent tovisit(t, null)
.TypeVisitor.visit
(TypeMirror t, P p) Visits a type.TypeVisitor.visitUnknown
(TypeMirror t, P p) Visits an unknown kind of type.ModifierConstructorDescriptionConstructs a new MirroredTypeException for the specified type.Creates a newUnknownTypeException
.Thep
parameter may be used to pass in an additional argument with information about the context in which the unknown type was encountered; for example, the visit methods ofTypeVisitor
may pass in their additional parameter.ModifierConstructorDescriptionMirroredTypesException
(List<? extends TypeMirror> types) Constructs a new MirroredTypesException for the specified types. -
Uses of TypeMirror in javax.lang.model.util
Modifier and TypeMethodDescriptionTypes.asMemberOf
(DeclaredType containing, Element element) Returns the type of an element when that element is viewed as a member of, or otherwise directly contained by, a given type.Types.capture
(TypeMirror t) Applies capture conversion to a type.Types.erasure
(TypeMirror t) Returns the erasure of a type.Modifier and TypeMethodDescriptionList<? extends TypeMirror>
Types.directSupertypes
(TypeMirror t) Returns the direct supertypes of a type.Modifier and TypeMethodDescriptionTypes.asElement
(TypeMirror t) Returns the element corresponding to a type.Types.capture
(TypeMirror t) Applies capture conversion to a type.boolean
Types.contains
(TypeMirror t1, TypeMirror t2) Tests whether one type argument contains another.protected R
SimpleTypeVisitor6.defaultAction
(TypeMirror e, P p) The default action for visit methods.List<? extends TypeMirror>
Types.directSupertypes
(TypeMirror t) Returns the direct supertypes of a type.Types.erasure
(TypeMirror t) Returns the erasure of a type.Types.getArrayType
(TypeMirror componentType) Returns an array type with the specified component type.Types.getDeclaredType
(TypeElement typeElem, TypeMirror... typeArgs) Returns the type corresponding to a type element and actual type arguments.Types.getDeclaredType
(DeclaredType containing, TypeElement typeElem, TypeMirror... typeArgs) Returns the type corresponding to a type element and actual type arguments, given a containing type of which it is a member.Types.getWildcardType
(TypeMirror extendsBound, TypeMirror superBound) Returns a new wildcard type.boolean
Types.isAssignable
(TypeMirror t1, TypeMirror t2) Tests whether one type is assignable to another.boolean
Types.isSameType
(TypeMirror t1, TypeMirror t2) Tests whether twoTypeMirror
objects represent the same type.boolean
Types.isSubtype
(TypeMirror t1, TypeMirror t2) Tests whether one type is a subtype of another.Types.unboxedType
(TypeMirror t) Returns the type (a primitive type) of unboxed values of a given type.final R
AbstractTypeVisitor6.visit
(TypeMirror t) Visits any type mirror as if by passing itself to that type mirror'saccept
method and passingnull
for the additional parameter.final R
AbstractTypeVisitor6.visit
(TypeMirror t, P p) Visits any type mirror as if by passing itself to that type mirror'saccept
method.SimpleAnnotationValueVisitor6.visitType
(TypeMirror t, P p) Visits a type value in an annotation.AbstractTypeVisitor6.visitUnknown
(TypeMirror t, P p) Visits an unknown kind of type.