@Documented @Retention(value=RUNTIME) @Target(value={PACKAGE,TYPE}) public @interface Promises
Promise annotations. It is a
modeling error for an entity to have both a Promises and a
Promise annotation.
Promise annotations without imposing any
further constraint on the program's implementation.
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 { ... }
@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 { ... }
PromiseCopyright © 2012 Surelogic, Inc.. All Rights Reserved.