org.jvnet.annox.model
Class XAnnotatedElement<T extends AnnotatedElement>

java.lang.Object
  extended by org.jvnet.annox.model.XAnnotated
      extended by org.jvnet.annox.model.XAnnotatedElement<T>
Type Parameters:
T - type of the annotated element.
All Implemented Interfaces:
AnnotatedElement
Direct Known Subclasses:
XClass, XMember, XPackage

public class XAnnotatedElement<T extends AnnotatedElement>
extends XAnnotated
implements AnnotatedElement

Defines an annotated element.

Author:
Aleksei Valikov

Constructor Summary
XAnnotatedElement(T annotatedElement, XAnnotation[] xannotations)
          Constructs an annotated element.
 
Method Summary
 T getAnnotatedElement()
          Returns the target annotated element.
<X extends Annotation>
X
getAnnotation(Class<X> annotationClass)
           
 Annotation[] getDeclaredAnnotations()
           
 boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
           
 
Methods inherited from class org.jvnet.annox.model.XAnnotated
equals, getAnnotations, getXAnnotations, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.reflect.AnnotatedElement
getAnnotations
 

Constructor Detail

XAnnotatedElement

public XAnnotatedElement(T annotatedElement,
                         XAnnotation[] xannotations)
Constructs an annotated element.

Parameters:
annotatedElement - target annotated element.
xannotations - element annotations.
Method Detail

getAnnotatedElement

public T getAnnotatedElement()
Returns the target annotated element.

Returns:
Target annotated element.

isAnnotationPresent

public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
Specified by:
isAnnotationPresent in interface AnnotatedElement

getAnnotation

public <X extends Annotation> X getAnnotation(Class<X> annotationClass)
Specified by:
getAnnotation in interface AnnotatedElement

getDeclaredAnnotations

public Annotation[] getDeclaredAnnotations()
Specified by:
getDeclaredAnnotations in interface AnnotatedElement


Copyright © 2006-2011 Highsource. All Rights Reserved.