Class UniversalElement
java.lang.Object
org.microbean.construct.UniversalConstruct<Element>
org.microbean.construct.element.UniversalElement
- All Implemented Interfaces:
Constable
,AnnotatedConstruct
,Element
,ExecutableElement
,ModuleElement
,PackageElement
,Parameterizable
,QualifiedNameable
,RecordComponentElement
,TypeElement
,TypeParameterElement
,VariableElement
public final class UniversalElement
extends UniversalConstruct<Element>
implements ExecutableElement, ModuleElement, PackageElement, RecordComponentElement, TypeElement, TypeParameterElement, VariableElement
An
Element
and UniversalConstruct
implementation.- Author:
- Laird Nelson
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface javax.lang.model.element.ModuleElement
ModuleElement.Directive, ModuleElement.DirectiveKind, ModuleElement.DirectiveVisitor<R,
P>, ModuleElement.ExportsDirective, ModuleElement.OpensDirective, ModuleElement.ProvidesDirective, ModuleElement.RequiresDirective, ModuleElement.UsesDirective -
Constructor Summary
ConstructorDescriptionUniversalElement
(Element delegate, Domain domain) Creates a newUniversalElement
. -
Method Summary
Modifier and TypeMethodDescriptionfinal <R,
P> R accept
(ElementVisitor<R, P> v, P p) final UniversalType
asType()
final boolean
final boolean
generic()
Returnstrue
if and only if thisUniversalElement
is a generic class declaration.final UniversalElement
final List
<? extends UniversalType> final Object
final AnnotationValueRecord
final List
<? extends UniversalDirective> final List
<? extends UniversalElement> final UniversalElement
final UniversalElement
final List
<? extends UniversalType> final ElementKind
getKind()
final NestingKind
final List
<? extends UniversalElement> final StringName
final UniversalType
final List
<? extends UniversalElement> final UniversalType
final StringName
final UniversalType
final List
<? extends UniversalType> final List
<? extends UniversalElement> final int
hashCode()
final boolean
final boolean
isOpen()
final boolean
final boolean
final boolean
A convenience method that returnstrue
if thisUniversalElement
is the class declaration forjava.lang.Object
.static final List
<? extends UniversalElement> of
(Collection<? extends Element> es, Domain domain) Returns a non-null
, immutableList
ofUniversalElement
s whose elements wrap the suppliedList
's elements.static final UniversalElement
Returns aUniversalElement
that is either the suppliedElement
(if it itself isnull
or is aUniversalElement
) or one that wraps it.Methods inherited from class org.microbean.construct.UniversalConstruct
delegate, describeConstable, domain, getAnnotation, getAnnotationMirrors, getAnnotationsByType, toString, unwrap
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface javax.lang.model.element.Element
getAnnotation, getAnnotationMirrors, getAnnotationsByType
Methods inherited from interface javax.lang.model.element.TypeElement
getPermittedSubclasses
-
Constructor Details
-
UniversalElement
Creates a newUniversalElement
.- Parameters:
delegate
- anElement
to which operations will be delegated; must not benull
domain
- aDomain
from which the supplieddelegate
is presumed to have originated; must not benull
- Throws:
NullPointerException
- if either argument isnull
- See Also:
-
-
Method Details
-
accept
-
asType
- Specified by:
asType
in interfaceElement
- Specified by:
asType
in interfaceExecutableElement
- Specified by:
asType
in interfaceModuleElement
- Specified by:
asType
in interfacePackageElement
- Specified by:
asType
in interfaceRecordComponentElement
- Specified by:
asType
in interfaceTypeElement
- Specified by:
asType
in interfaceTypeParameterElement
- Specified by:
asType
in interfaceVariableElement
-
equals
-
generic
Returnstrue
if and only if thisUniversalElement
is a generic class declaration.- Returns:
true
if and only if thisUniversalElement
is a generic class declaration- External Specifications
-
getAccessor
- Specified by:
getAccessor
in interfaceRecordComponentElement
-
getBounds
- Specified by:
getBounds
in interfaceTypeParameterElement
-
getConstantValue
- Specified by:
getConstantValue
in interfaceVariableElement
-
getDefaultValue
- Specified by:
getDefaultValue
in interfaceExecutableElement
-
getDirectives
- Specified by:
getDirectives
in interfaceModuleElement
-
getEnclosedElements
- Specified by:
getEnclosedElements
in interfaceElement
- Specified by:
getEnclosedElements
in interfaceModuleElement
- Specified by:
getEnclosedElements
in interfacePackageElement
- Specified by:
getEnclosedElements
in interfaceTypeElement
-
getEnclosingElement
- Specified by:
getEnclosingElement
in interfaceElement
- Specified by:
getEnclosingElement
in interfaceExecutableElement
- Specified by:
getEnclosingElement
in interfaceModuleElement
- Specified by:
getEnclosingElement
in interfacePackageElement
- Specified by:
getEnclosingElement
in interfaceRecordComponentElement
- Specified by:
getEnclosingElement
in interfaceTypeElement
- Specified by:
getEnclosingElement
in interfaceTypeParameterElement
- Specified by:
getEnclosingElement
in interfaceVariableElement
-
getGenericElement
- Specified by:
getGenericElement
in interfaceTypeParameterElement
-
getInterfaces
- Specified by:
getInterfaces
in interfaceTypeElement
-
getKind
-
getModifiers
- Specified by:
getModifiers
in interfaceElement
-
getNestingKind
- Specified by:
getNestingKind
in interfaceTypeElement
-
getParameters
- Specified by:
getParameters
in interfaceExecutableElement
-
getQualifiedName
- Specified by:
getQualifiedName
in interfaceModuleElement
- Specified by:
getQualifiedName
in interfacePackageElement
- Specified by:
getQualifiedName
in interfaceQualifiedNameable
- Specified by:
getQualifiedName
in interfaceTypeElement
-
getReceiverType
- Specified by:
getReceiverType
in interfaceExecutableElement
-
getRecordComponents
- Specified by:
getRecordComponents
in interfaceTypeElement
-
getReturnType
- Specified by:
getReturnType
in interfaceExecutableElement
-
getSimpleName
- Specified by:
getSimpleName
in interfaceElement
- Specified by:
getSimpleName
in interfaceExecutableElement
- Specified by:
getSimpleName
in interfaceModuleElement
- Specified by:
getSimpleName
in interfacePackageElement
- Specified by:
getSimpleName
in interfaceRecordComponentElement
- Specified by:
getSimpleName
in interfaceTypeElement
- Specified by:
getSimpleName
in interfaceVariableElement
-
getSuperclass
- Specified by:
getSuperclass
in interfaceTypeElement
-
getThrownTypes
- Specified by:
getThrownTypes
in interfaceExecutableElement
-
getTypeParameters
- Specified by:
getTypeParameters
in interfaceExecutableElement
- Specified by:
getTypeParameters
in interfaceParameterizable
- Specified by:
getTypeParameters
in interfaceTypeElement
-
hashCode
-
isDefault
- Specified by:
isDefault
in interfaceExecutableElement
-
isOpen
- Specified by:
isOpen
in interfaceModuleElement
-
isUnnamed
- Specified by:
isUnnamed
in interfaceModuleElement
- Specified by:
isUnnamed
in interfacePackageElement
- Specified by:
isUnnamed
in interfaceVariableElement
-
isVarArgs
- Specified by:
isVarArgs
in interfaceExecutableElement
-
javaLangObject
A convenience method that returnstrue
if thisUniversalElement
is the class declaration forjava.lang.Object
.- Returns:
true
if thisUniversalElement
is the class declaration forjava.lang.Object
-
of
public static final List<? extends UniversalElement> of(Collection<? extends Element> es, Domain domain) Returns a non-null
, immutableList
ofUniversalElement
s whose elements wrap the suppliedList
's elements.- Parameters:
es
- aCollection
ofElement
s; must not benull
domain
- aDomain
; must not benull
- Returns:
- a non-
null
, immutableList
ofUniversalElement
s - Throws:
NullPointerException
- if either argument isnull
-
of
Returns aUniversalElement
that is either the suppliedElement
(if it itself isnull
or is aUniversalElement
) or one that wraps it.- Parameters:
e
- anElement
; may benull
in which casenull
will be returneddomain
- aDomain
; must not benull
- Returns:
- a
UniversalElement
, ornull
(ife
isnull
) - Throws:
NullPointerException
- ifdomain
isnull
- See Also:
-