java.lang.Object
iu.type.ElementBase
iu.type.AnnotatedElementBase<E>
iu.type.DeclaredElementBase<D,E>
- Type Parameters:
D
- declaring typeE
- generic declaration type
- All Implemented Interfaces:
IuAnnotatedElement
,IuDeclaredElement<D>
- Direct Known Subclasses:
ExecutableBase
,FieldFacade
,TypeTemplate
abstract sealed class DeclaredElementBase<D,E extends AnnotatedElement>
extends AnnotatedElementBase<E>
implements IuDeclaredElement<D>
permits ExecutableBase<D,R,E>, FieldFacade<D,T>, TypeTemplate<D,T>
Implements the facade view of an
GenericDeclaration
.-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final TypeFacade
<?, D> Hold an unguarded reference to the declaringTypeFacade
, to facilitate subclasses registeringElementBase.postInit(Runnable)
hooks.(package private) final Type
Holds the generic type associated with the declared element.Fields inherited from class iu.type.AnnotatedElementBase
annotatedElement
-
Constructor Summary
ConstructorsConstructorDescriptionDeclaredElementBase
(E annotatedElement, Type type, TypeTemplate<?, D> declaringTypeTemplate) Default constructor, for use by all subclasses extended byTypeTemplate
.DeclaredElementBase
(E annotatedElement, Consumer<TypeTemplate<?, ?>> preInitHook, Type type, TypeTemplate<?, D> declaringTypeTemplate) Constructor for use byTypeTemplate
. -
Method Summary
Methods inherited from class iu.type.AnnotatedElementBase
annotation, annotations, hasAnnotation, permitted
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
annotation, annotations, hasAnnotation, permitted, permitted
-
Field Details
-
type
Holds the generic type associated with the declared element.Initialized first (after
preInitHook
) accessible early. -
declaringType
Hold an unguarded reference to the declaringTypeFacade
, to facilitate subclasses registeringElementBase.postInit(Runnable)
hooks.
-
-
Constructor Details
-
DeclaredElementBase
DeclaredElementBase(E annotatedElement, Type type, TypeTemplate<?, D> declaringTypeTemplate) Default constructor, for use by all subclasses extended byTypeTemplate
.- Parameters:
annotatedElement
- parameterized element to provide a view oftype
- generic type associated with the elementdeclaringTypeTemplate
- type template for the type that declares this element
-
DeclaredElementBase
DeclaredElementBase(E annotatedElement, Consumer<TypeTemplate<?, ?>> preInitHook, Type type, TypeTemplate<?, D> declaringTypeTemplate) Constructor for use byTypeTemplate
.- Parameters:
annotatedElement
- parameterized element to provide a view ofpreInitHook
- used byTypeFactory
type
- generic type associated with the elementdeclaringTypeTemplate
- type template for the type that declares this element
-
-
Method Details
-
declaringType
Description copied from interface:IuDeclaredElement
Gets the declaring type.- Specified by:
declaringType
in interfaceIuDeclaredElement<D>
- Returns:
- declaring type
-