Annotation Type Instantiator


  • @Target(TYPE)
    @Retention(RUNTIME)
    public @interface Instantiator
    Indicates that a IVilType is an instantiator. An instantiator takes arbitrary parameters from VIL and turns these settings into instantiated artifacts. Therefore it implements at least one method with the same name as value() that will be made available to the VIL build language. In case that the method is static, it will be called directly. Instantiator methods may throw exceptions. In case that the method is not static, an instance of the annotated class will be created (similar to artifacts, i.e., a public static method named "create", same return type as class, here without parameter, which then shall call create a new instance using the constructor of the class). It is encouraged that an instantiator returns the affected artifacts as return values (in particular as VIL set). Please note that classes marked with this annotation may additionally implement the interface IArtifactNotifier. In this case, the instantiator methods shall be non-static. During execution of the VIL build flow, appropriate instances will be created and linked to the current artifact model.
    If ClassMeta and this annotation are applied to the same class, this annotation takes precedence. Instantiators are registered using TypeRegistry.registerType(Class).
    Author:
    Holger Eichelberger
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String value
      The name of the instantiator as it will appear in VIL build flows for production strategy execution.
    • Element Detail

      • value

        java.lang.String value
        The name of the instantiator as it will appear in VIL build flows for production strategy execution. To be recognized, instantiator methods must have the same name. Please note that VIL buildlanguage keywords shall not be used as name as such instantiators will not be available!
        Returns:
        the name
      • acceptsImplicitParameters

        boolean acceptsImplicitParameters
        Whether this instantiator may react on implicit parameters such as Constants.IMPLICIT_PARENT_PARAMETER_NAME.
        true for implicit parameters, false else
        Returns:
        whether this instantiator may react on implicit parameters
        Default:
        false