Skip to content

DSLAction Annotation

Malte Isberner edited this page Jan 19, 2014 · 1 revision

The @DSLAction annotation controls the role of a method of the DSL implementation.

Usage

This annotation may only be used to annotate methods of a class or interface which is itself annotated with a GenerateEmbeddedDSL annotation. It has no mandatory parameters. If used without any parameter, it flags a method as being available as a DSL action. This only has an effect if enableAllMethods is set to false in @GenerateEmbeddedDSL.

Optional Parameters

  • enabled: controls whether this method is available as a DSL action. If set to false, this method will not be available as a DSL action. The value of this parameter always overrides the enableAllMethods setting of @GenerateEmbeddedDSL. It is discouraged to explicitly set any of the other options if this parameter is set to false, doing so will result in a warning.
  • global: controls whether the corresponding DSL action is a global action. The default is false.
  • terminator: controls whether the corresponding DSL action is a terminator action. The default is false.
  • autoVarArgs: controls whether a varargs overload will automatically be generated if applicable. The default depends on the autoVarArgs setting of @GenerateEmbeddedDSL.

Javadoc

Clone this wiki locally