com.surelogic
Annotation Type InLayer


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

Declares that the annotated type is part of the named layers.

Semantics:

Including an annotated type into a named layer does not constrain the implementation of the program, it simply gives a name to a subset of the program's types.

Examples:

Declaring a type to be part of a layer.
 @InLayer("edu.afit.smallworld.text.ui.CONSOLE_UI")
 class Example { ... }
 
Declaring a type to be part of two different layers.
 @InLayer("edu.afit.smallworld.text.ui.CONSOLE_UI, edu.afit.smallworld.text.ui.SWING_UI")
 class Example { ... }
 
Alternatively:
 @InLayer("edu.afit.smallworld.text.ui.{CONSOLE_UI, SWING_UI}")
 class Example { ... }
 

Javadoc usage notes:

This annotation may placed in Javadoc, which can be useful for Java 1.4 code which does not include language support for annotations, via the @annotate tag.
 /**
  * @annotate InLayer("edu.afit.smallworld.text.ui.{CONSOLE_UI, SWING_UI}")
  */
 class Example { ... }
 

See Also:
Layer

Required Element Summary
 String value
          The one or more layers that the type is part of.
 

Element Detail

value

public abstract String value
The one or more layers that the type is part of. The attribute is restricted to strings that match the following grammar:

value = layer_spec *("," layer_spec)

layer_spec = dotted_name ; Layer name
layer_spec /= dotted_name "." "{" name *(", " name) "}" ; Enumeration of layers

The braces "{" "}" are syntactic sugar used to enumerate a list of layers that share the same prefix.



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