com.surelogic
Annotation Type Assumes


@Documented
@Target(value={TYPE,CONSTRUCTOR,METHOD})
public @interface Assumes

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

Semantics:

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

Examples:

Declaring two Assume annotations for the same declaration. The first places a Starts annotation the no-argument constructor for the IllegalArgumentExcpetion in java.lang. The second places a Starts annotation on the constructor that takes a single argument of type long for the WaiterPreferenceSemaphore class in any package.
 package EDU.oswego.cs.dl.util.concurrent;
 
 public class Rendezvous implements Barrier {
 
   @Starts("nothing")
   @Assumes( {
     @Assume("Starts(nothing) for new() in IllegalArgumentException in java.lang"),
     @Assume("Starts(nothing) for new(long) in WaiterPreferenceSemaphore")
   })
   public Rendezvous(int parties, RendezvousFunction function) {
     if (parties <= 0)
       throw new IllegalArgumentException();
     parties_ = parties;
     rendezvousFunction_ = function;
     entryGate_ = new WaiterPreferenceSemaphore(parties);
     slots_ = new Object[parties];
   }
   ...
 }
 

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 Assume("Starts(nothing) for new() in IllegalArgumentException in java.lang")
  * @annotate Assume("Starts(nothing) for new(long) in WaiterPreferenceSemaphore")
  */
 public Rendezvous(int parties, RendezvousFunction function) { ... }
 

See Also:
Assume

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

Element Detail

value

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



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