Annotation Interface Resource


@Retention(RUNTIME) @Target(FIELD) public @interface Resource
Marks the field as a resource to be injected.

In order to inject the resources for this class, the resources must be defined in a class resource file. You should name field resources in the resource file using the class name followed by a period (.) and the key:

  <classname>.<fieldname>
 
Author:
Hans Muller (Hans.Muller@Sun.COM)
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Key for resource injection.
  • Element Details

    • key

      String key
      Key for resource injection. If not specified the name of the field will be used.
      Default:
      ""