public interface JavaModelElement extends JavaElement
JavaAnnotationElement
)), i.e. classes, methods, fields and method parameters, will
implement this interface.Modifier and Type | Method and Description |
---|---|
Element |
getDeclaringElement()
For an inherited method for example, this will return the element in the super type that declares this method.
|
TypeMirror |
getModelRepresentation()
Note that this is distinctly different from
getDeclaringElement() . |
JavaModelElement |
getParent() |
boolean |
isInherited()
Each
JavaTypeElement contains as its children not only the elements that are declared on the type
but also elements that it inherits from its super types (with type parameters "instantiated" according to the
actual type). |
getTypeEnvironment
as, getApi, getArchive, getChildren, getFullHumanReadableString, iterateOverChildren, searchChildren, searchChildren, setParent, stream
compareTo
@Nullable JavaModelElement getParent()
getParent
in interface org.revapi.Element<JavaElement>
TypeMirror getModelRepresentation()
getDeclaringElement()
. This method returns a type mirror
describing an element on its position in the type hierarchy. I.e. if an inherited method with type parameters
resolved according to the class it is inherited "to".Element getDeclaringElement()
boolean isInherited()
JavaTypeElement
contains as its children not only the elements that are declared on the type
but also elements that it inherits from its super types (with type parameters "instantiated" according to the
actual type).
This flag indicates if this is a child of type that is directly declared on it (false
) or if it is
an instantiation of an inherited element (true
).
Copyright © 2014-2021 Lukas Krejci. All Rights Reserved.