Show Table of Contents
10.19. Predefined Class Level Annotations
Table 10.2. Predefined Class Level Annotations
| Annotation | Description |
|---|---|
| @role( <fact | event> ) |
This attribute can be used to assign roles to facts and events.
|
| @typesafe( <boolean> ) |
By default, all type declarations are compiled with type safety enabled.
@typesafe( false ) provides a means to override this behavior by permitting a fall-back, to type unsafe evaluation where all constraints are generated as MVEL constraints and executed dynamically. This is useful when dealing with collections that do not have any generics or mixed type collections.
|
| @timestamp( <attribute name> ) |
Creates a timestamp.
|
| @duration( <attribute name> ) |
Sets a duration for the implementation of an attribute.
|
| @expires( <time interval> ) |
Allows you to define when the attribute should expire.
|
| @propertyChangeSupport |
Facts that implement support for property changes as defined in the Javabean spec can now be annotated so that the engine register itself to listen for changes on fact properties. .
|
| @propertyReactive | Makes the type property reactive. |

Where did the comment section go?
Red Hat's documentation publication system recently went through an upgrade to enable speedier, more mobile-friendly content. We decided to re-evaluate our commenting platform to ensure that it meets your expectations and serves as an optimal feedback mechanism. During this redesign, we invite your input on providing feedback on Red Hat documentation via the discussion platform.