java.lang.Object
iu.type.ElementBase
- All Implemented Interfaces:
IuAnnotatedElement
- Direct Known Subclasses:
AnnotatedElementBase
,PropertyFacade
,TypeFacade
abstract sealed class ElementBase
extends Object
implements IuAnnotatedElement
permits AnnotatedElementBase<E>, TypeFacade<D,T>, PropertyFacade<D,T>
Provides initialization behavior for type facade elements.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor, for use by all subclasses extendTypeTemplate
.ElementBase
(Consumer<TypeTemplate<?, ?>> preInitHook) Constructor for use byTypeTemplate
. -
Method Summary
Modifier and TypeMethodDescription(package private) void
Checks to verify the element is sealed.(package private) void
May be invoked within a base constructor to defer part of initialization until after the facade instance is fully formed.(package private) void
seal()
Should be called at the end of all concrete subclass constructors.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
-
Constructor Details
-
ElementBase
ElementBase()Default constructor, for use by all subclasses extendTypeTemplate
. -
ElementBase
ElementBase(Consumer<TypeTemplate<?, ?>> preInitHook) Constructor for use byTypeTemplate
.- Parameters:
preInitHook
- used byTypeFactory
-
-
Method Details
-
checkSealed
Checks to verify the element is sealed.All public methods should invoke this method to verify immutability before attempting lookups.
- Throws:
IllegalStateException
- if the element is not sealed.
-
postInit
May be invoked within a base constructor to defer part of initialization until after the facade instance is fully formed.- Parameters:
run
- initialization segment to run after all facade elements are populated
-
seal
void seal()Should be called at the end of all concrete subclass constructors.
-