|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jst.ws.annotations.core.AnnotationDefinition
public final class AnnotationDefinition
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.
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.
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()
Deprecated. As of 1.1 replaced by getAnnotationType() |
java.lang.String |
getAnnotationClassName()
Returns the fully qualified class name of the annotation. |
org.eclipse.jdt.core.IType |
getAnnotationType()
Returns the annotation type as specified by the class attribute of the
annotation |
java.util.List<java.lang.annotation.ElementType> |
getAnnotationTypeTargets()
Returns a list of ElementType that specify the Java elements to which the annotation can be applied. |
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()
Deprecated. as of 1.1 replaced by getAnnotationTypeTargets() |
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. |
void |
setJavaProject(org.eclipse.jdt.core.IJavaProject javaProject)
Sets the org.eclipse.jdt.core.IJavaProject which is used to find the annotation type. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnnotationDefinition(org.eclipse.core.runtime.IConfigurationElement configurationElement, java.lang.String category)
AnnotationDefinition
using information from the
org.eclipse.jst.ws.annotations.core.annotationDefinition
extension point and category name.
configurationElement
- the annotation
element from the org.eclipse.jst.ws.annotations.core.annotationDefinition
extension pointcategory
- the category nameMethod Detail |
---|
public java.lang.String getName()
public java.lang.String getCategory()
public java.lang.String getAnnotationClassName()
public boolean isClassOnly()
true
if the annotation is restricted to classes only.public boolean isInterfaceOnly()
true
if the annotation is restricted to interfaces only.public boolean isEnumOnly()
true
if the annotation is restricted to enums only.@Deprecated public java.lang.Class<? extends java.lang.annotation.Annotation> getAnnotationClass()
getAnnotationType()
class
attribute of the
annotation element in the org.eclipse.jst.ws.annotations.core.annotationDefinition
extension point.
- Returns:
- the annotation class or null if not found.
public org.eclipse.jdt.core.IType getAnnotationType()
class
attribute of the
annotation element in the org.eclipse.jst.ws.annotations.core.annotationDefinition
extension point.
- Returns:
- the
org.eclipse.jdt.core.IType
which represents an annotation type or null if the java project
has not been set, if the type cannot be found or if the type does not represent an annotation type. - Since:
- 1.1
- See Also:
setJavaProject(IJavaProject)
@Deprecated public java.util.List<java.lang.annotation.ElementType> getTargets()
getAnnotationTypeTargets()
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.
public java.util.List<java.lang.annotation.ElementType> getAnnotationTypeTargets()
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.
setJavaProject(IJavaProject)
public IAnnotationAttributeInitializer getAnnotationAttributeInitializer()
org.eclipse.jst.ws.annotations.core.annotationInitializer
extension point or null if no
initializer can be found.
IAnnotationAttributeInitializer
public void setJavaProject(org.eclipse.jdt.core.IJavaProject javaProject)
org.eclipse.jdt.core.IJavaProject
which is used to find the annotation type.
getAnnotationType()
,
getAnnotationTypeTargets()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |