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
ConstructorsConstructorDescriptionUniversalElement(Element delegate, Domain domain) Creates a newUniversalElement. -
Method Summary
Modifier and TypeMethodDescriptionfinal <R,P> R accept(ElementVisitor<R, P> v, P p) final UniversalTypeasType()final booleanfinal booleangeneric()Returnstrueif and only if thisUniversalElementis a generic class declaration.final UniversalElementfinal List<? extends UniversalType> final Objectfinal AnnotationValueRecordfinal List<? extends UniversalDirective> final List<? extends UniversalElement> final UniversalElementfinal UniversalElementfinal List<? extends UniversalType> final ElementKindgetKind()final NestingKindfinal List<? extends UniversalElement> final StringNamefinal UniversalTypefinal List<? extends UniversalElement> final UniversalTypefinal StringNamefinal UniversalTypefinal List<? extends UniversalType> final List<? extends UniversalElement> final inthashCode()final booleanfinal booleanisOpen()final booleanfinal booleanfinal booleanA convenience method that returnstrueif thisUniversalElementis the class declaration forjava.lang.Object.static final List<? extends UniversalElement> of(Collection<? extends Element> es, Domain domain) Returns a non-null, immutableListofUniversalElements whose elements wrap the suppliedList's elements.static final UniversalElementReturns aUniversalElementthat is either the suppliedElement(if it itself isnullor is aUniversalElement) or one that wraps it.Methods inherited from class org.microbean.construct.UniversalConstruct
delegate, describeConstable, domain, getAnnotation, getAnnotationMirrors, getAnnotationsByType, toString, unwrapMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface javax.lang.model.element.Element
getAnnotation, getAnnotationMirrors, getAnnotationsByTypeMethods inherited from interface javax.lang.model.element.TypeElement
getPermittedSubclasses
-
Constructor Details
-
UniversalElement
Creates a newUniversalElement.- Parameters:
delegate- anElementto which operations will be delegated; must not benulldomain- aDomainfrom which the supplieddelegateis presumed to have originated; must not benull- Throws:
NullPointerException- if either argument isnull- See Also:
-
-
Method Details
-
accept
-
asType
- Specified by:
asTypein interfaceElement- Specified by:
asTypein interfaceExecutableElement- Specified by:
asTypein interfaceModuleElement- Specified by:
asTypein interfacePackageElement- Specified by:
asTypein interfaceTypeElement- Specified by:
asTypein interfaceTypeParameterElement- Specified by:
asTypein interfaceVariableElement
-
equals
-
generic
Returnstrueif and only if thisUniversalElementis a generic class declaration.- Returns:
trueif and only if thisUniversalElementis a generic class declaration- External Specifications
-
getAccessor
- Specified by:
getAccessorin interfaceRecordComponentElement
-
getBounds
- Specified by:
getBoundsin interfaceTypeParameterElement
-
getConstantValue
- Specified by:
getConstantValuein interfaceVariableElement
-
getDefaultValue
- Specified by:
getDefaultValuein interfaceExecutableElement
-
getDirectives
- Specified by:
getDirectivesin interfaceModuleElement
-
getEnclosedElements
- Specified by:
getEnclosedElementsin interfaceElement- Specified by:
getEnclosedElementsin interfaceModuleElement- Specified by:
getEnclosedElementsin interfacePackageElement- Specified by:
getEnclosedElementsin interfaceTypeElement
-
getEnclosingElement
- Specified by:
getEnclosingElementin interfaceElement- Specified by:
getEnclosingElementin interfaceExecutableElement- Specified by:
getEnclosingElementin interfaceModuleElement- Specified by:
getEnclosingElementin interfacePackageElement- Specified by:
getEnclosingElementin interfaceRecordComponentElement- Specified by:
getEnclosingElementin interfaceTypeElement- Specified by:
getEnclosingElementin interfaceTypeParameterElement- Specified by:
getEnclosingElementin interfaceVariableElement
-
getGenericElement
- Specified by:
getGenericElementin interfaceTypeParameterElement
-
getInterfaces
- Specified by:
getInterfacesin interfaceTypeElement
-
getKind
-
getModifiers
- Specified by:
getModifiersin interfaceElement
-
getNestingKind
- Specified by:
getNestingKindin interfaceTypeElement
-
getParameters
- Specified by:
getParametersin interfaceExecutableElement
-
getQualifiedName
- Specified by:
getQualifiedNamein interfaceModuleElement- Specified by:
getQualifiedNamein interfacePackageElement- Specified by:
getQualifiedNamein interfaceQualifiedNameable- Specified by:
getQualifiedNamein interfaceTypeElement
-
getReceiverType
- Specified by:
getReceiverTypein interfaceExecutableElement
-
getRecordComponents
- Specified by:
getRecordComponentsin interfaceTypeElement
-
getReturnType
- Specified by:
getReturnTypein interfaceExecutableElement
-
getSimpleName
- Specified by:
getSimpleNamein interfaceElement- Specified by:
getSimpleNamein interfaceExecutableElement- Specified by:
getSimpleNamein interfaceModuleElement- Specified by:
getSimpleNamein interfacePackageElement- Specified by:
getSimpleNamein interfaceRecordComponentElement- Specified by:
getSimpleNamein interfaceTypeElement- Specified by:
getSimpleNamein interfaceVariableElement
-
getSuperclass
- Specified by:
getSuperclassin interfaceTypeElement
-
getThrownTypes
- Specified by:
getThrownTypesin interfaceExecutableElement
-
getTypeParameters
- Specified by:
getTypeParametersin interfaceExecutableElement- Specified by:
getTypeParametersin interfaceParameterizable- Specified by:
getTypeParametersin interfaceTypeElement
-
hashCode
-
isDefault
- Specified by:
isDefaultin interfaceExecutableElement
-
isOpen
- Specified by:
isOpenin interfaceModuleElement
-
isUnnamed
- Specified by:
isUnnamedin interfaceModuleElement- Specified by:
isUnnamedin interfacePackageElement- Specified by:
isUnnamedin interfaceTypeElement- Specified by:
isUnnamedin interfaceVariableElement
-
isVarArgs
- Specified by:
isVarArgsin interfaceExecutableElement
-
javaLangObject
A convenience method that returnstrueif thisUniversalElementis the class declaration forjava.lang.Object.- Returns:
trueif thisUniversalElementis the class declaration forjava.lang.Object
-
of
public static final List<? extends UniversalElement> of(Collection<? extends Element> es, Domain domain) Returns a non-null, immutableListofUniversalElements whose elements wrap the suppliedList's elements.- Parameters:
es- aCollectionofElements; must not benulldomain- aDomain; must not benull- Returns:
- a non-
null, immutableListofUniversalElements - Throws:
NullPointerException- if either argument isnull
-
of
Returns aUniversalElementthat is either the suppliedElement(if it itself isnullor is aUniversalElement) or one that wraps it.- Parameters:
e- anElement; may benullin which casenullwill be returneddomain- aDomain; must not benull- Returns:
- a
UniversalElement, ornull(ifeisnull) - Throws:
NullPointerException- ifdomainisnull- See Also:
-