|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||
@Documented @Target(value=FIELD) public @interface AggregateInRegion
Declares that the Instance region of the object referenced by this
field is to be mapped into a named region of the object that contains the
field to which this annotation is applied.
It is a modeling error if the field declaration is not also annotated with
Unique. It is a modeling error if the field declaration is also
annotated with Aggregate.
ObserverRegion, that
includes the integer notifyCounter and the state referenced by the
observers field (i.e., the internals of the HashSet object).
@Region("private ObserverRegion")
class Observer {
@InRegion("ObserverRegion")
private int notifyCounter = 0;
@Unique
@AggregateInRegion("ObserverRegion")
private final Set<Callback> observers = new HashSet<Callback>()
...
}
@annotate tag.
/**
* @annotate Region("private ObserverRegion")
*/
class Observer {
/**
* @annotate InRegion("ObserverRegion")
*/
private int notifyCounter = 0;
/**
* @annotate Unique
* @annotate AggregateInRegion("ObserverRegion")
*/
private final Set<Callback> observers = new HashSet<Callback>()
...
}
Aggregate,
Unique| Required Element Summary | |
|---|---|
String |
value
The value of this attribute indicates the region that the Instance region of the object referenced by this field is to be
mapped or "aggregated" into. |
| Element Detail |
|---|
public abstract String value
Instance region of the object referenced by this field is to be
mapped or "aggregated" into. The value of this attribute must conform to
the following grammar (in Augmented Backus–Naur
Form):
value = regionSpecification
regionSpecification = simpleRegionSpecificaion / qualifiedRegionName
simpleRegionSpecification = IDENTIFIER / "[" "]" ; Region of the class being annotated
qualifedRegionName = IDENTIFIER *("." IDENTIFIER) : IDENTIFER ; Static region from the named, optionally qualified, class
IDENTIFIER = Legal Java Identifier
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT | ||||||||