Annotation Interface Observes


@Retention(RUNTIME) @Target(METHOD) public @interface Observes
Annotation used to specify an observation that an action can make. Cannot be repeated.

Should only be used with java methods of the following form: List<Map<Variable,Symbol>> method(Term term);

i.e., the method has to take a single Term (or Predicate) as an argument and return a list of maps from Variable to Symbol. Methods that do not respect this will not be available as observers in action and a warning will be shown.

Examples:

- Annotation for an action that will observe if ?x is on the table or on the shelf. \ @Observes({"on(table,?x)", "on(shelf,?x)"})

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
     
  • Element Details