java.lang.Object
iu.type.ElementBase
iu.type.AnnotatedElementBase<E>
- Type Parameters:
E
- annotated element type
- All Implemented Interfaces:
IuAnnotatedElement
- Direct Known Subclasses:
DeclaredElementBase
,ParameterFacade
sealed class AnnotatedElementBase<E extends AnnotatedElement>
extends ElementBase
implements IuAnnotatedElement
permits DeclaredElementBase<D,E>, ParameterFacade<T>
Implements the facade view of an
AnnotatedElement
.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final E
Real annotated element viewed via this facade. -
Constructor Summary
ConstructorsConstructorDescriptionAnnotatedElementBase
(E annotatedElement) Default constructor, for use by all subclasses extendTypeTemplate
.AnnotatedElementBase
(E annotatedElement, Consumer<TypeTemplate<?, ?>> preInitHook) Constructor for use byTypeTemplate
. -
Method Summary
Modifier and TypeMethodDescription<A extends Annotation>
Aannotation
(Class<A> annotationType) Gets an annotation.Iterable
<? extends Annotation> Gets all defined annotations.boolean
hasAnnotation
(Class<? extends Annotation> annotationType) Determines if an annotation is present.boolean
Determines if access to this element is permitted in the current context.Methods inherited from class iu.type.ElementBase
checkSealed, postInit, seal
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface edu.iu.type.IuAnnotatedElement
permitted
-
Field Details
-
annotatedElement
Real annotated element viewed via this facade.
-
-
Constructor Details
-
AnnotatedElementBase
AnnotatedElementBase(E annotatedElement) Default constructor, for use by all subclasses extendTypeTemplate
.- Parameters:
annotatedElement
- real annotated element to provide a view of
-
AnnotatedElementBase
AnnotatedElementBase(E annotatedElement, Consumer<TypeTemplate<?, ?>> preInitHook) Constructor for use byTypeTemplate
.- Parameters:
annotatedElement
- real annotated element to provide a view ofpreInitHook
- used byTypeFactory
-
-
Method Details
-
hasAnnotation
Description copied from interface:IuAnnotatedElement
Determines if an annotation is present.- Specified by:
hasAnnotation
in interfaceIuAnnotatedElement
- Parameters:
annotationType
- annotation type- Returns:
- true if the annotation is present, else null
-
annotation
Description copied from interface:IuAnnotatedElement
Gets an annotation.- Specified by:
annotation
in interfaceIuAnnotatedElement
- Type Parameters:
A
- annotation type- Parameters:
annotationType
- annotation type- Returns:
- annotation if present, else null
-
annotations
Description copied from interface:IuAnnotatedElement
Gets all defined annotations.- Specified by:
annotations
in interfaceIuAnnotatedElement
- Returns:
- all annotations
-
permitted
Description copied from interface:IuAnnotatedElement
Determines if access to this element is permitted in the current context.- Specified by:
permitted
in interfaceIuAnnotatedElement
- Parameters:
isUserInRole
- Delegates role-checks to a higher level module.- Returns:
- true if access is permitted in the current context; else false
-