## Uses of Interface
java.lang.annotation.Annotation

Packages that use Annotation
Package | Description
--- | ---
java.beans | Contains classes related to developing beans -- components based on the JavaBeansTM architecture.
java.lang | Provides classes that are fundamental to the design of the Java programming language.
java.lang.annotation | Provides library support for the Java programming language annotation facility.
java.lang.reflect | Provides classes and interfaces for obtaining reflective information about classes and objects.
javax.annotation |
javax.annotation.processing | Facilities for declaring annotation processors and for allowing annotation processors to communicate with an annotation processing tool environment.
javax.jws |
javax.jws.soap |
javax.lang.model.element | Interfaces used to model elements of the Java programming language.
javax.management | Provides the core classes for the Java Management Extensions.
javax.xml.bind.annotation | Defines annotations for customizing Java program elements to XML Schema mapping.
javax.xml.bind.annotation.adapters | `XmlAdapter` and its spec-defined sub-classes to allow arbitrary Java classes to be used with JAXB.
javax.xml.ws | This package contains the core JAX-WS APIs.
javax.xml.ws.soap | This package defines APIs specific to the SOAP binding.
javax.xml.ws.spi | This package defines SPIs for JAX-WS.

### Uses of Annotation in java.beans

Classes in java.beans that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `ConstructorProperties` An annotation on a constructor that shows how the parameters of that constructor correspond to the constructed object's getter methods.

### Uses of Annotation in java.lang

Classes in java.lang that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `Deprecated` A program element annotated @Deprecated is one that programmers are discouraged from using, typically because it is dangerous, or because a better alternative exists.
`interface` | `Override` Indicates that a method declaration is intended to override a method declaration in a superclass.
`interface` | `SuppressWarnings` Indicates that the named compiler warnings should be suppressed in the annotated element (and in all program elements contained in the annotated element).

Methods in java.lang with type parameters of type Annotation
Modifier and Type | Method and Description
--- | ---
`<A extends Annotation> A` | Package.`getAnnotation(Class<A> annotationClass)`
`<A extends Annotation> A` | Class.`getAnnotation(Class<A> annotationClass)`

Methods in java.lang that return Annotation
Modifier and Type | Method and Description
--- | ---
`Annotation[]` | Package.`getAnnotations()`
`Annotation[]` | Class.`getAnnotations()`
`Annotation[]` | Package.`getDeclaredAnnotations()`
`Annotation[]` | Class.`getDeclaredAnnotations()`

Method parameters in java.lang with type arguments of type Annotation
Modifier and Type | Method and Description
--- | ---
`boolean` | Package.`isAnnotationPresent(Class<? extends Annotation> annotationClass)`
`boolean` | Class.`isAnnotationPresent(Class<? extends Annotation> annotationClass)`

### Uses of Annotation in java.lang.annotation

Classes in java.lang.annotation that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `Documented` Indicates that annotations with a type are to be documented by javadoc and similar tools by default.
`interface` | `Inherited` Indicates that an annotation type is automatically inherited.
`interface` | `Retention` Indicates how long annotations with the annotated type are to be retained.
`interface` | `Target` Indicates the kinds of program element to which an annotation type is applicable.

Methods in java.lang.annotation that return types with arguments of type Annotation
Modifier and Type | Method and Description
--- | ---
`Class<? extends Annotation>` | IncompleteAnnotationException.`annotationType()` Returns the Class object for the annotation type with the missing element.
`Class<? extends Annotation>` | Annotation.`annotationType()` Returns the annotation type of this annotation.

Constructor parameters in java.lang.annotation with type arguments of type Annotation
Constructor and Description
`IncompleteAnnotationException(Class<? extends Annotation> annotationType, String elementName)` Constructs an IncompleteAnnotationException to indicate that the named element was missing from the specified annotation type.

### Uses of Annotation in java.lang.reflect

Methods in java.lang.reflect with type parameters of type Annotation
Modifier and Type | Method and Description
--- | ---
`<T extends Annotation> T` | Method.`getAnnotation(Class<T> annotationClass)`
`<T extends Annotation> T` | Field.`getAnnotation(Class<T> annotationClass)`
`<T extends Annotation> T` | Constructor.`getAnnotation(Class<T> annotationClass)`
`<T extends Annotation> T` | AnnotatedElement.`getAnnotation(Class<T> annotationClass)` Returns this element's annotation for the specified type if such an annotation is present, else null.
`<T extends Annotation> T` | AccessibleObject.`getAnnotation(Class<T> annotationClass)`

Methods in java.lang.reflect that return Annotation
Modifier and Type | Method and Description
--- | ---
`Annotation[]` | AnnotatedElement.`getAnnotations()` Returns all annotations present on this element.
`Annotation[]` | AccessibleObject.`getAnnotations()`
`Annotation[]` | Method.`getDeclaredAnnotations()`
`Annotation[]` | Field.`getDeclaredAnnotations()`
`Annotation[]` | Constructor.`getDeclaredAnnotations()`
`Annotation[]` | AnnotatedElement.`getDeclaredAnnotations()` Returns all annotations that are directly present on this element.
`Annotation[]` | AccessibleObject.`getDeclaredAnnotations()`
`Annotation[][]` | Method.`getParameterAnnotations()` Returns an array of arrays that represent the annotations on the formal parameters, in declaration order, of the method represented by this `Method` object.
`Annotation[][]` | Constructor.`getParameterAnnotations()` Returns an array of arrays that represent the annotations on the formal parameters, in declaration order, of the method represented by this `Constructor` object.

Method parameters in java.lang.reflect with type arguments of type Annotation
Modifier and Type | Method and Description
--- | ---
`boolean` | AnnotatedElement.`isAnnotationPresent(Class<? extends Annotation> annotationClass)` Returns true if an annotation for the specified type is present on this element, else false.
`boolean` | AccessibleObject.`isAnnotationPresent(Class<? extends Annotation> annotationClass)`

### Uses of Annotation in javax.annotation

Classes in javax.annotation that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `Generated` The Generated annoation is used to mark source code that has been generated.
`interface` | `PostConstruct` The PostConstruct annotation is used on a method that needs to be executed after dependency injection is done to perform any initialization.
`interface` | `PreDestroy` The PreDestroy annotation is used on methods as a callback notification to signal that the instance is in the process of being removed by the container.
`interface` | `Resource` The Resource annotation marks a resource that is needed by the application.
`interface` | `Resources` This class is used to allow multiple resources declarations.

### Uses of Annotation in javax.annotation.processing

Classes in javax.annotation.processing that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `SupportedAnnotationTypes` An annotation used to indicate what annotation types an annotation processor supports.
`interface` | `SupportedOptions` An annotation used to indicate what options an annotation processor supports.
`interface` | `SupportedSourceVersion` An annotation used to indicate the latest source version an annotation processor supports.

Method parameters in javax.annotation.processing with type arguments of type Annotation
Modifier and Type | Method and Description
--- | ---
`Set<? extends Element>` | RoundEnvironment.`getElementsAnnotatedWith(Class<? extends Annotation> a)` Returns the elements annotated with the given annotation type.

### Uses of Annotation in javax.jws

Classes in javax.jws that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `HandlerChain` Associates the Web Service with an externally defined handler chain.
`interface` | `Oneway` Indicates that the given @WebMethod has only an input message and no output.
`interface` | `WebMethod` Customizes a method that is exposed as a Web Service operation.
`interface` | `WebParam` Customizes the mapping of an individual parameter to a Web Service message part and XML element.
`interface` | `WebResult` Customizes the mapping of the return value to a WSDL part and XML element.
`interface` | `WebService` Marks a Java class as implementing a Web Service, or a Java interface as defining a Web Service interface.

### Uses of Annotation in javax.jws.soap

Classes in javax.jws.soap that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `InitParam` Deprecated. As of JSR-181 2.0 with no replacement.
`interface` | `SOAPBinding` Specifies the mapping of the Web Service onto the SOAP message protocol.
`interface` | `SOAPMessageHandler` Deprecated. As of JSR-181 2.0 with no replacement.
`interface` | `SOAPMessageHandlers` Deprecated. As of JSR-181 2.0 with no replacement.

### Uses of Annotation in javax.lang.model.element

Methods in javax.lang.model.element with type parameters of type Annotation
Modifier and Type | Method and Description
--- | ---
`<A extends Annotation> A` | Element.`getAnnotation(Class<A> annotationType)` Returns this element's annotation for the specified type if such an annotation is present, else `null`.

### Uses of Annotation in javax.management

Classes in javax.management that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `DescriptorKey` Meta-annotation that describes how an annotation element relates to a field in a `Descriptor`.
`interface` | `MXBean` Annotation to mark an interface explicitly as being an MXBean interface, or as not being an MXBean interface.

### Uses of Annotation in javax.xml.bind.annotation

Classes in javax.xml.bind.annotation that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `XmlAccessorOrder` Controls the ordering of fields and properties in a class.
`interface` | `XmlAccessorType` Controls whether fields or Javabean properties are serialized by default.
`interface` | `XmlAnyAttribute` Maps a JavaBean property to a map of wildcard attributes.
`interface` | `XmlAnyElement` Maps a JavaBean property to XML infoset representation and/or JAXB element.
`interface` | `XmlAttachmentRef` Marks a field/property that its XML form is a uri reference to mime content.
`interface` | `XmlAttribute` Maps a JavaBean property to a XML attribute.
`interface` | `XmlElement` Maps a JavaBean property to a XML element derived from property name.
`interface` | `XmlElementDecl` Maps a factory method to a XML element.
`interface` | `XmlElementRef` Maps a JavaBean property to a XML element derived from property's type.
`interface` | `XmlElementRefs` Marks a property that refers to classes with `XmlElement` or JAXBElement.
`interface` | `XmlElements` A container for multiple @`XmlElement` annotations.
`interface` | `XmlElementWrapper` Generates a wrapper element around XML representation.
`interface` | `XmlEnum` Maps an enum type `Enum` to XML representation.
`interface` | `XmlEnumValue` Maps an enum constant in `Enum` type to XML representation.
`interface` | `XmlID` Maps a JavaBean property to XML ID.
`interface` | `XmlIDREF` Maps a JavaBean property to XML IDREF.
`interface` | `XmlInlineBinaryData` Disable consideration of XOP encoding for datatypes that are bound to base64-encoded binary data in XML.
`interface` | `XmlList` Used to map a property to a list simple type.
`interface` | `XmlMimeType` Associates the MIME type that controls the XML representation of the property.
`interface` | `XmlMixed` Annotate a JavaBean multi-valued property to support mixed content.
`interface` | `XmlNs` Associates a namespace prefix with a XML namespace URI.
`interface` | `XmlRegistry` Marks a class that has `XmlElementDecl`s.
`interface` | `XmlRootElement` Maps a class or an enum type to an XML element.
`interface` | `XmlSchema` Maps a package name to a XML namespace.
`interface` | `XmlSchemaType` Maps a Java type to a simple schema built-in type.
`interface` | `XmlSchemaTypes` A container for multiple @`XmlSchemaType` annotations.
`interface` | `XmlSeeAlso` Instructs JAXB to also bind other classes when binding this class.
`interface` | `XmlTransient` Prevents the mapping of a JavaBean property/type to XML representation.
`interface` | `XmlType` Maps a class or an enum type to a XML Schema type.
`interface` | `XmlValue` Enables mapping a class to a XML Schema complex type with a simpleContent or a XML Schema simple type.

### Uses of Annotation in javax.xml.bind.annotation.adapters

Classes in javax.xml.bind.annotation.adapters that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `XmlJavaTypeAdapter` Use an adapter that implements `XmlAdapter` for custom marshaling.
`interface` | `XmlJavaTypeAdapters` A container for multiple @`XmlJavaTypeAdapter` annotations.

### Uses of Annotation in javax.xml.ws

Classes in javax.xml.ws that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `Action` The `Action` annotation allows explicit association of a WS-Addressing `Action` message addressing property with `input`, `output`, and `fault` messages of the mapped WSDL operation.
`interface` | `BindingType` The `BindingType` annotation is used to specify the binding to use for a web service endpoint implementation class.
`interface` | `FaultAction` The `FaultAction` annotation is used inside an `Action` annotation to allow an explicit association of a WS-Addressing `Action` message addressing property with the `fault` messages of the WSDL operation mapped from the exception class.
`interface` | `RequestWrapper` Used to annotate methods in the Service Endpoint Interface with the request wrapper bean to be used at runtime.
`interface` | `RespectBinding` This feature clarifies the use of the `wsdl:binding` in a JAX-WS runtime.
`interface` | `ResponseWrapper` Used to annotate methods in the Service Endpoint Interface with the response wrapper bean to be used at runtime.
`interface` | `ServiceMode` Used to indicate whether a `Provider` implementation wishes to work with entire protocol messages or just with protocol message payloads.
`interface` | `WebEndpoint` Used to annotate the `getPortName()` methods of a generated service interface.
`interface` | `WebFault` Used to annotate service specific exception classes to customize to the local and namespace name of the fault element and the name of the fault bean.
`interface` | `WebServiceClient` Used to annotate a generated service interface.
`interface` | `WebServiceProvider` Used to annotate a Provider implementation class.
`interface` | `WebServiceRef` The `WebServiceRef` annotation is used to define a reference to a web service and (optionally) an injection target for it.
`interface` | `WebServiceRefs` The `WebServiceRefs` annotation allows multiple web service references to be declared at the class level.

### Uses of Annotation in javax.xml.ws.soap

Classes in javax.xml.ws.soap that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `Addressing` This feature represents the use of WS-Addressing with either the SOAP 1.1/HTTP or SOAP 1.2/HTTP binding.
`interface` | `MTOM` This feature represents the use of MTOM with a web service.

### Uses of Annotation in javax.xml.ws.spi

Classes in javax.xml.ws.spi that implement Annotation
Modifier and Type | Class and Description
--- | ---
`interface` | `WebServiceFeatureAnnotation` Annotation used to identify other annotations as a `WebServiceFeature`.

Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.