Interface Parameterizable
- All Superinterfaces:
AnnotatedConstruct, Element
- All Known Subinterfaces:
ExecutableElement, TypeElement
A mixin interface for an element that has type parameters.
- Since:
- 1.7
-
Method Summary
Modifier and TypeMethodDescriptionList
<? extends TypeParameterElement> Returns the formal type parameters of an element in declaration order.Methods declared in interface Element
accept, asType, equals, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getEnclosedElements, getEnclosingElement, getKind, getModifiers, getSimpleName, hashCode
Modifier and TypeMethodDescription<R,
P> R accept
(ElementVisitor<R, P> v, P p) Applies a visitor to this element.asType()
Returns the type defined by this element.boolean
Returnstrue
if the argument represents the same element asthis
, orfalse
otherwise.<A extends Annotation>
AgetAnnotation
(Class<A> annotationType) Returns this construct's annotation of the specified type if such an annotation is present, elsenull
.List
<? extends AnnotationMirror> Returns the annotations that are directly present on this construct.<A extends Annotation>
A[]getAnnotationsByType
(Class<A> annotationType) Returns annotations of the specified type that are associated with this construct.Returns the elements that are, loosely speaking, directly enclosed by this element.Returns the innermost element within which this element is, loosely speaking, enclosed.getKind()
Returns thekind
of this element.Returns the modifiers of this element, excluding annotations.Returns the simple (unqualified) name of this element.int
hashCode()
Obeys the general contract ofObject.hashCode
.
-
Method Details
-
getTypeParameters
List<? extends TypeParameterElement> getTypeParameters()Returns the formal type parameters of an element in declaration order.- Returns:
- the formal type parameters, or an empty list if there are none
-