|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) @Target(value=FIELD) public @interface Context
The Context annotation type is used to annotate a field within a control implementation
class that refers to a contextual service. The Java Controls runtime will automatically
initialize the field value to an appropriate provider of the requested service, or will
throw a construction or deserialization error if no such provider is available.
The following is a simple example:
This example declares a field named
myContext
that will automatically be
initialized by the Java Controls runtime to refer to a provider of the
ControlContext
contextual service.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |