Package com.sun.ts.lib.util.sec.reflect.annotation

# Class AnnotationType

java.lang.Object
com.sun.ts.lib.util.sec.reflect.annotation.AnnotationType

public class AnnotationType extends Object
Represents an annotation type at run time. Used to type-check annotations and apply member defaults.

Since:
  1.5
Author:
  Josh Bloch

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static AnnotationType`
  `getInstance(Class annotationClass)`
  Returns an AnnotationType instance for the specified annotation type.
  `static Class`
  `invocationHandlerReturnType(Class type)`
  Returns the type that must be returned by the invocation handler of a dynamic proxy in order to have the dynamic proxy return the specified type (which is assumed to be a legal member type for an annotation).
  `boolean`
  `isInherited()`
  `Map<String,Object>`
  `memberDefaults()`
  `Map<String,Method>`
  `members()`
  `Map<String,Class>`
  `memberTypes()`
  `RetentionPolicy`
  `retention()`
  `String`
  `toString()`
  For debugging.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getInstance

    public static AnnotationType getInstance(Class annotationClass)
    Returns an AnnotationType instance for the specified annotation type.
    Parameters:
      `annotationClass` - the class object for the annotation type
    Returns:
      an AnnotationType instance for the specified annotation type

  - ### invocationHandlerReturnType

    public static Class invocationHandlerReturnType(Class type)
    Returns the type that must be returned by the invocation handler of a dynamic proxy in order to have the dynamic proxy return the specified type (which is assumed to be a legal member type for an annotation).
    Parameters:
      `type` - the type to be returned by the invocation handler
    Returns:
      the type that must be returned by the invocation handler of a dynamic proxy in order to have the dynamic

  - ### memberTypes

    public Map<String,Class> memberTypes()
    Returns:
      member types for this annotation type (member name -> type mapping).

  - ### members

    public Map<String,Method> members()
    Returns:
      members of this annotation type (member name -> associated Method object mapping).

  - ### memberDefaults

    public Map<String,Object> memberDefaults()
    Returns:
      the default values for this annotation type (Member name -> default value mapping).

  - ### retention

    public RetentionPolicy retention()
    Returns:
      the retention policy for this annotation type.

  - ### isInherited

    public boolean isInherited()
    Returns:
      true if this this annotation type is inherited.

  - ### toString

    public String toString()
    For debugging.
    Overrides:
      `toString` in class `Object`
    Returns:
      a string representation of this annotation type.