com.surelogic
Annotation Type Promises


@Documented
@Target(value={PACKAGE,TYPE})
public @interface Promises

Container annotation for multiple Promise annotations. It is a modeling error for an entity to have both a Promises and a Promise annotation.

Semantics:

This annotation holds a list Promise annotations without imposing any further constraint on the program's implementation.

Examples:

Declaring two Promise annotations for the same class. The first places a Starts annotation on all the constructors in the class and the second places a Borrowed annotation on all the methods and constructors in the class.
 @Promises({
   @Promise("@Starts(nothing) for new(**)"),
   @Promise("@Borrowed(this)")
 })
 class Example { ... }
 

Javadoc usage notes:

This annotation is not supported in Javadoc because Javadoc supports multiple @annotate tags of the same type (see the example below). Javadoc annotation can be useful for Java 1.4 code which does not include language support for annotations.
 /**
  * @annotate Promise("@Starts(nothing) for new(**)")
  * @annotate Promise("@Borrowed(this)")
  */
 class Example { ... }
 

See Also:
Promise

Required Element Summary
 Promise[] value
          The Promise annotations to apply to the class.
 

Element Detail

value

public abstract Promise[] value
The Promise annotations to apply to the class.



Copyright © 2011 Surelogic, Inc.. All Rights Reserved.