checkers.typestate
Annotation Type Any


@Retention(value=RUNTIME)
public @interface Any

A special state annotation, specifying that an object may be in an arbitrary state. As a lack of a state annotation means "any annotation", this is only useful when specifying state transitions, the except element or the onException element.

Author:
Adam Warski (adam at warski dot org)

Optional Element Summary
 java.lang.Class<? extends java.lang.annotation.Annotation> after
           
 java.lang.Class<? extends java.lang.annotation.Annotation>[] except
          Please note: support for the except parameter is still not complete.
 java.lang.Class<? extends java.lang.annotation.Annotation> onException
           
 

after

public abstract java.lang.Class<? extends java.lang.annotation.Annotation> after
Returns:
The state of the object after the method in which the annotations is used completes.
Default:
checkers.typestate.NoChange.class

except

public abstract java.lang.Class<? extends java.lang.annotation.Annotation>[] except
Please note: support for the except parameter is still not complete. It may yield inappropriate results when the object to which this annotation applies is used is in an undefined state, as may be the case for example after an if-else or try-catch-finally block.

Returns:
States that this annotation does not cover. If the object will be in a state that is listed here, the transition specified by this annotation won't take effect, nor will this annotation accept the object.
Default:
{}

onException

public abstract java.lang.Class<? extends java.lang.annotation.Annotation> onException
Returns:
The state of the object if the method in which the annotation is used throws an exception.
Default:
checkers.typestate.NoChange.class