com.hammurapi.reasoning.spi
Annotation Type Accept


@Target(value=METHOD)
@Retention(value=RUNTIME)
public @interface Accept

This annotation is used to indicate that method is a filter method for a multi-fact inference method. The purpose of this annotation is similar to Override annotation, i.e. it ensures that accept methods are properly bound to rules container inference infrastructure. This annotation is checked at runtime after rule instantiation, as opposed to compile-time check of Override.

Author:
Pavel TODO Multi-parameter accept methods for partial joins.

Optional Element Summary
 double cost
          Cost of accept condition evaluation.
 String method
           
 int[] parameterPositions
           
 Class<?>[] parameterTypes
           
 

method

public abstract String method
Returns:
Inference method name, this accept method is for. If not specified, this accept method will be invoked for all infer methods with matching parameters.
Default:
""

parameterTypes

public abstract Class<?>[] parameterTypes
Returns:
Parameter types of inference method.
Default:
{}

parameterPositions

public abstract int[] parameterPositions
Returns:
Positions of parameters which this method is attached to. It is used for multi-parameter accept methods.
Default:
-1

cost

public abstract double cost
Cost of accept condition evaluation. This cost can be used by rule compilation/execution engine to optimize condition order.

Returns:
Default:
1.0