Annotation Interface ContainerDelegateAPI.CustomType

Enclosing interface:
ContainerDelegateAPI

@Retention(RUNTIME) public static @interface ContainerDelegateAPI.CustomType
Register a custom component type. The type must be a valid String representation of a ComponentType. The base must be a suitable CodeDelegate subclass. The base may be included in shared code.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Class<? extends CodeDelegate>
    The base code delegate.
    Component type as String.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Optional code template if the custom type is intended to be extended by additional component code.
  • Element Details

    • type

      String type
      Component type as String. The value must be a valid representation of a ComponentType.
      Returns:
      component type
    • base

      Class<? extends CodeDelegate> base
      The base code delegate. The base may be included in shared code.
      Returns:
      base delegate
    • template

      String template
      Optional code template if the custom type is intended to be extended by additional component code. The code template should be valid Java code for inclusion in a class body. It may also include import statements. Ideally the code should have no behavioural effects, but just provide a scaffold, such as empty methods. For example -
       
       import SHARED.Data;
       import static SHARED.DataUtils.*;
      
           @Override
           public void process(Data data) {
      
           }
       
       
      Implementation note : due to limitations in the current API, the template is only read on component creation. Later updates to the template will not be reflected in existing components.
      Returns:
      optional code template
      Default:
      ""