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 EReal 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.booleanhasAnnotation(Class<? extends Annotation> annotationType) Determines if an annotation is present.booleanDetermines if access to this element is permitted in the current context.Methods inherited from class iu.type.ElementBase
checkSealed, postInit, sealMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:IuAnnotatedElementDetermines if an annotation is present.- Specified by:
hasAnnotationin interfaceIuAnnotatedElement- Parameters:
annotationType- annotation type- Returns:
- true if the annotation is present, else null
-
annotation
Description copied from interface:IuAnnotatedElementGets an annotation.- Specified by:
annotationin interfaceIuAnnotatedElement- Type Parameters:
A- annotation type- Parameters:
annotationType- annotation type- Returns:
- annotation if present, else null
-
annotations
Description copied from interface:IuAnnotatedElementGets all defined annotations.- Specified by:
annotationsin interfaceIuAnnotatedElement- Returns:
- all annotations
-
permitted
Description copied from interface:IuAnnotatedElementDetermines if access to this element is permitted in the current context.- Specified by:
permittedin interfaceIuAnnotatedElement- Parameters:
isUserInRole- Delegates role-checks to a higher level module.- Returns:
- true if access is permitted in the current context; else false
-