Annotation Interface ElementDefinition


@Retention(RUNTIME) @Target(PACKAGE) public @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.
  • Element Details

    • value

      String value
      Names the Element. If left unspecified, the element will bear the name of the package.
      Returns:
      the name of the element.
      Default:
      ""
    • additionalPackages

      ElementPackage[] additionalPackages
      Specifies additional packages to scan when locating Element components.
      Returns:
      a listing of additional element packages.
      Default:
      {}
    • recursive

      boolean recursive
      Set to true to scan this package and all subordinate packages for services.
      Default:
      false
    • loader

      Class<? extends ElementLoader> loader
      Specifies the ElementLoader used to load this element. If left blank, this will use the default element loader specified in the Java SPI system. If an Element requires special loading semantics that are not provided by the default annotation-driven schemes, then this allows the custom loader to be used.
      Returns:
      the ElementLoader type
      Default:
      dev.getelements.elements.sdk.ElementLoader.Default.class