Marks a method as a field declaration. New field's name becomes this annotation's name()
parameter or the annotated method's name if the name() is empty.
The annotated method must be non-void and have a single argument. The argument's type denotes the fact type that we want to declare a new field on. The method's return type becomes the field's type.
The annotated method can use both instance and static class members to compute field value.
-
Optional Element Summary
Optional Elements
-
Element Details
-
name
String nameIdentifies the name of the field being declared. If the name is omitted, the field is named after the annotated method.- Returns:
- field name
- Default:
- ""
-
type
String typeOptional logical type on which this field is declared. If the type is omitted, the engine will derive the fact's type from the method's single argument.- Returns:
- logical type
- See Also:
- Default:
- ""
-