public class

AnnotationType

extends Object
java.lang.Object
   ↳ sun.reflect.annotation.AnnotationType

Class Overview

Represents an annotation type at run time. Used to type-check annotations and apply member defaults.

Summary

Public Methods
synchronized 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()
Returns true if this this annotation type is inherited.
Map<StringObject> memberDefaults()
Returns the default values for this annotation type (Member name -> default value mapping).
Map<StringClass> memberTypes()
Returns member types for this annotation type (member name -> type mapping).
Map<StringMethod> members()
Returns members of this annotation type (member name -> associated Method object mapping).
RetentionPolicy retention()
Returns the retention policy for this annotation type.
String toString()
For debugging.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static synchronized AnnotationType getInstance (Class annotationClass)

Returns an AnnotationType instance for the specified annotation type.

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).

public boolean isInherited ()

Returns true if this this annotation type is inherited.

public Map<StringObject> memberDefaults ()

Returns the default values for this annotation type (Member name -> default value mapping).

public Map<StringClass> memberTypes ()

Returns member types for this annotation type (member name -> type mapping).

public Map<StringMethod> members ()

Returns members of this annotation type (member name -> associated Method object mapping).

public RetentionPolicy retention ()

Returns the retention policy for this annotation type.

public String toString ()

For debugging.

Returns
  • a string representation of the object.