com.surelogic
Annotation Type InRegions


@Documented
@Target(value=TYPE)
public @interface InRegions

Container annotation for multiple InRegion annotations on a type. It is a modeling error for a type to have both an InRegion and an InRegions annotation.

Examples:

The class C declares two regions. The region Position contains the fields x, y, and z. The region Counters contains the fields readCounter and writeCounter.
 @Regions({
   @Region("private Position"),
   @Region("private Counters")
 })
 @InRegions({
   @InRegion("x, y, z into Position"),
   @InRegion("readCount, writeCount into Counters")
 })
 public class C {
   private int x, y, z;
   private int readCount;
   private int WriteCount;
   ...
 }
 
The above example is equivalent to the following use of InRegion on field declarations.
 @Regions({
   @Region("private Position"),
   @Region("private Counters")
 })
 public class C {
   @InRegion("Position"
   private int x, y, z;
   
   @InRegion("Counters")
   private int readCount;
   
   @InRegion("Counters")
   private int WriteCount;
   ...
 }
 
Which style is preferred is a matter of programmer preference.

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 Region("private Position")
  * @annotate Region("private Counters")
  * @annotate InRegion("x, y, z into Position")
  * @annotate InRegion("readCount, writeCount into Counters")
  */
 public class C {
   private int x, y, z;
   private int readCount;
   private int WriteCount;
   ...
 }
 

See Also:
InRegion

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

Element Detail

value

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



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