com.hammurapi.review
Annotation Type Inspect


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

This annotation indicates that method is an inspector method. Inspector methods can return facts and post facts (conclusions). Review engine needs to know types of rule outputs. From rule class introspection the rule system knows about rule method return type, but it doesn't know about types posted through post(). Also, return type might not be enough, as returned instances may implement interfaces which other rules are interested in, but which are not declared in the rule return type. Annotation parameter allows rules to inform the inference system about posted types.

For methods without fact types information provided through annotation parameter, the review system uses method return type.

Author:
Pavel

Optional Element Summary
 String[] category
           
 int severity
           
 Class<?>[] value
           
 

value

public abstract Class<?>[] value
Returns:
Conclusion types posted by this method.
Default:
{}

severity

public abstract int severity
Returns:
Inspector severity. This value is overriden by the value provided in the inspector set definition.
Default:
2

category

public abstract String[] category
Returns:
Inspector category. Category definition in the inspector set definition file overrides this category definition.
Default:
{}