java.lang.Object
org.microbean.lang.AnnotatedConstruct
org.microbean.lang.element.Element
- All Implemented Interfaces:
AnnotatedConstruct
,Element
,Encloseable
,Encloser
- Direct Known Subclasses:
ModuleElement
,PackageElement
,Parameterizable
,RecordComponentElement
,TypeParameterElement
,VariableElement
public abstract sealed class Element
extends AnnotatedConstruct
implements Element, Encloseable, Encloser
permits ModuleElement, PackageElement, Parameterizable, RecordComponentElement, TypeParameterElement, VariableElement
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<R,
P> R accept
(ElementVisitor<R, P> v, P p) <E extends Element & Encloseable>
voidaddEnclosedElement
(E e) final <E extends Element & Encloseable>
voidaddEnclosedElements
(Iterable<? extends E> es) final boolean
addModifier
(Modifier modifier) final void
addModifiers
(Iterable<? extends Modifier> modifiers) final TypeMirror
asType()
static final boolean
canEnclose
(ElementKind k1, ElementKind k2) final ElementKind
getKind()
final Name
boolean
final void
void
setEnclosingElement
(Element enclosingElement) final void
setSimpleName
(String simpleName) final void
setSimpleName
(Name simpleName) final void
setType
(TypeMirror type) toString()
protected <E extends Element>
Eprotected ElementKind
validateKind
(ElementKind kind) protected Modifier
validateModifier
(Modifier modifier) protected Name
protected TypeMirror
validateType
(TypeMirror type) Methods inherited from class org.microbean.lang.AnnotatedConstruct
addAnnotationMirror, addAnnotationMirrors, getAnnotation, getAnnotationMirrors, getAnnotationsByType, validateAnnotationMirror
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.lang.model.element.Element
equals, getAnnotation, getAnnotationMirrors, getAnnotationsByType, hashCode
-
Constructor Details
-
Element
-
-
Method Details
-
accept
-
asType
-
setType
-
validateType
-
getEnclosedElements
- Specified by:
getEnclosedElements
in interfaceElement
-
setEnclosedElementsGenerator
-
addEnclosedElement
- Specified by:
addEnclosedElement
in interfaceEncloser
-
addEnclosedElements
-
validateEnclosedElement
-
getKind
-
validateKind
-
getModifiers
- Specified by:
getModifiers
in interfaceElement
-
addModifier
-
addModifiers
-
validateModifier
-
getSimpleName
- Specified by:
getSimpleName
in interfaceElement
-
setSimpleName
-
setSimpleName
-
validateSimpleName
-
isUnnamed
public boolean isUnnamed() -
getEnclosingElement
- Specified by:
getEnclosingElement
in interfaceElement
-
setEnclosingElement
Description copied from interface:Encloseable
- Specified by:
setEnclosingElement
in interfaceEncloseable
- Parameters:
enclosingElement
- theElement
that will enclose thisEncloseable
; may benull
-
toString
-
canEnclose
-