Annotation Interface ElementDefinition
Defines a
Element. This must be at the package level and will, by default, scan
all sub-packages for types annotated with ElementService and exposes them via the ElementLoader
interface.
A element may not necessarily need to provide services, so this annotation is not strictly required anywhere. However,
no types may be instantiated using ElementLoader without this present.-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionSpecifies additional packages to scan when locating Element components.Class<? extends ElementLoader> Specifies theElementLoaderused to load this element.booleanSet to true to scan this package and all subordinate packages for services.Names the Element.
-
Element Details
-
value
String valueNames the Element. If left unspecified, the element will bear the name of the package.- Returns:
- the name of the element.
- Default:
""
-
additionalPackages
ElementPackage[] additionalPackagesSpecifies additional packages to scan when locating Element components.- Returns:
- a listing of additional element packages.
- Default:
{}
-
recursive
boolean recursiveSet to true to scan this package and all subordinate packages for services.- Default:
false
-
loader
Class<? extends ElementLoader> loaderSpecifies theElementLoaderused to load this element. If left blank, this will use the default element loader specified in the Java SPI system. If anElementrequires special loading semantics that are not provided by the default annotation-driven schemes, then this allows the custom loader to be used.- Returns:
- the
ElementLoadertype
- Default:
dev.getelements.elements.sdk.ElementLoader.Default.class
-