org.eclipse.jst.ws.annotations.core
Class AnnotationDefinition

java.lang.Object
  extended by org.eclipse.jst.ws.annotations.core.AnnotationDefinition

public final class AnnotationDefinition
extends java.lang.Object

An AnnotationDefinition is a representation of the information contributed through the org.eclipse.jst.ws.annotations.core.annotationDefinition, org.eclipse.jst.ws.annotations.core.annotationCategory and org.eclipse.jst.ws.annotations.core.annotationInitializer extension points. for a java.lang.annotation.Annotation class.

It supplies the annotation class name, its annotation category, the applicable targets for the annotation and an IAnnotationAttributeInitializer to initialize the annotations element-value pairs.

Provisional API: This class/interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Constructor Summary
AnnotationDefinition(org.eclipse.core.runtime.IConfigurationElement configurationElement, java.lang.String category)
          Constructs an AnnotationDefinition using information from the org.eclipse.jst.ws.annotations.core.annotationDefinition extension point and category name.
 
Method Summary
 IAnnotationAttributeInitializer getAnnotationAttributeInitializer()
          Returns the annotations attribute initializer as specified in the org.eclipse.jst.ws.annotations.core.annotationInitializer extension point or null if no initializer can be found.
 java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationClass()
          Returns the annotation class as specified by the class attribute of the annotation element in the org.eclipse.jst.ws.annotations.core.annotationDefinition extension point.
 java.lang.String getAnnotationClassName()
          Returns the fully qualified class name of the annotation.
 java.lang.String getCategory()
          Returns the category the annotation belongs to.
 java.lang.String getName()
          Returns the annotation name.
 java.util.List<java.lang.annotation.ElementType> getTargets()
          Returns a list of ElementType that specify the Java elements to which the annotation can be applied.
 boolean isClassOnly()
          Returns whether the annotation is restricted to class types.
 boolean isEnumOnly()
          Returns whether the annotation is restricted to enum types.
 boolean isInterfaceOnly()
          Returns whether the annotation is restricted to interface types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationDefinition

public AnnotationDefinition(org.eclipse.core.runtime.IConfigurationElement configurationElement,
                            java.lang.String category)
Constructs an AnnotationDefinition using information from the org.eclipse.jst.ws.annotations.core.annotationDefinition extension point and category name.

Parameters:
configurationElement - the annotation element from the org.eclipse.jst.ws.annotations.core.annotationDefinition extension point
category - the category name
Method Detail

getName

public java.lang.String getName()
Returns the annotation name.

Returns:
the annotation name.

getCategory

public java.lang.String getCategory()
Returns the category the annotation belongs to.

Returns:
the annotation category.

getAnnotationClassName

public java.lang.String getAnnotationClassName()
Returns the fully qualified class name of the annotation.

Returns:
the fully qualified class name of the annotation.

isClassOnly

public boolean isClassOnly()
Returns whether the annotation is restricted to class types.

Returns:
true if the annotation is restricted to classes only.

isInterfaceOnly

public boolean isInterfaceOnly()
Returns whether the annotation is restricted to interface types.

Returns:
true if the annotation is restricted to interfaces only.

isEnumOnly

public boolean isEnumOnly()
Returns whether the annotation is restricted to enum types.

Returns:
true if the annotation is restricted to enums only.

getAnnotationClass

public java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationClass()
Returns the annotation class as specified by the class attribute of the annotation element in the org.eclipse.jst.ws.annotations.core.annotationDefinition extension point.

Returns:
the annotation class

getTargets

public java.util.List<java.lang.annotation.ElementType> getTargets()
Returns a list of ElementType that specify the Java elements to which the annotation can be applied.

The element types are retrieved from the annotations Target meta-annotation type. This list can be filtered using the targetFilter element on the org.eclipse.jst.ws.annotations.core.annotationDefinition extension point when defining the annotation.

Returns:
a list of element types.

getAnnotationAttributeInitializer

public IAnnotationAttributeInitializer getAnnotationAttributeInitializer()
Returns the annotations attribute initializer as specified in the org.eclipse.jst.ws.annotations.core.annotationInitializer extension point or null if no initializer can be found.

Returns:
the IAnnotationAttributeInitializer