Module org.praxislive.code
Package org.praxislive.code
Annotation Interface ContainerDelegateAPI.CustomType
- Enclosing interface:
ContainerDelegateAPI
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 ElementsModifier and TypeRequired ElementDescriptionClass<? extends CodeDelegate> The base code delegate.Component type as String. -
Optional Element Summary
Optional Elements
-
Element Details
-
type
String typeComponent type as String. The value must be a valid representation of aComponentType.- Returns:
- component type
-
base
Class<? extends CodeDelegate> baseThe base code delegate. The base may be included in shared code.- Returns:
- base delegate
-
template
String templateOptional 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 -
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.import SHARED.Data; import static SHARED.DataUtils.*; @Override public void process(Data data) { }- Returns:
- optional code template
- Default:
""
-