javax.annotation

## Annotation Type Resource

-     @Target(value={TYPE,METHOD,FIELD})
      @Retention(value=RUNTIME)
      public @interface Resource

  Since:
    Common Annotations 1.0

- - ### Optional Element Summary

    Optional Elements
    Modifier and Type | Optional Element and Description
    --- | ---
    `Resource.AuthenticationType` | `authenticationType`
    `java.lang.String` | `description`
    `java.lang.String` | `lookup`
    `java.lang.String` | `mappedName`
    `java.lang.String` | `name`
    `boolean` | `shareable`
    `java.lang.Class<?>` | `type` Uses generics since Common Annotations 1.2.

- - ### Element Detail

    - #### name

          public abstract java.lang.String name

      Returns:
        a String with the name of the resource
      Default:
        ""

    - #### type

          public abstract java.lang.Class<?> type

      Uses generics since Common Annotations 1.2.
      Returns:
        The type for instances of this resource
      Default:
        java.lang.Object.class

    - #### authenticationType

          public abstract Resource.AuthenticationType authenticationType

      Returns:
        the AuthenticationType of the resource default CONTAINER
      Default:
        javax.annotation.Resource.AuthenticationType.CONTAINER

    - #### shareable

          public abstract boolean shareable

      Returns:
        true (default) if the resource is shareable, or false if not
      Default:
        true

    - #### description

          public abstract java.lang.String description

      Returns:
        a string with the description for the resource
      Default:
        ""

    - #### mappedName

          public abstract java.lang.String mappedName

      Returns:
        a string with the mappedName of the resource
      Default:
        ""

    - #### lookup

          public abstract java.lang.String lookup

      Returns:
        The name of the entry, if any, to use for this resource
      Since:
        Common Annotations 1.1
      Default:
        ""

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.