org.jvnet.annox.model
Class XMethod

java.lang.Object
  extended by org.jvnet.annox.model.XAnnotated
      extended by org.jvnet.annox.model.XAnnotatedElement<T>
          extended by org.jvnet.annox.model.XMember<Method>
              extended by org.jvnet.annox.model.XMethod
All Implemented Interfaces:
AnnotatedElement, ParameterizedAnnotatedElement

public class XMethod
extends XMember<Method>
implements ParameterizedAnnotatedElement

Defines an annotated method.

Author:
Aleksei Valikov

Field Summary
static XMethod[] EMPTY_ARRAY
          Empty array of methods.
 
Constructor Summary
XMethod(Method method, XAnnotation[] xannotations, XParameter[] parameters)
          Constructs an annotated method.
 
Method Summary
 Method getMethod()
          Returns the target methid.
 Annotation[][] getParameterAnnotations()
          Returns an array of arrays that represent the annotations on the formal parameters, in declaration order, of the method represented by this parameterized annotated element.
 XParameter[] getParameters()
          Returns annotated parameters of the method.
 
Methods inherited from class org.jvnet.annox.model.XMember
equals, getMember, getName, hashCode
 
Methods inherited from class org.jvnet.annox.model.XAnnotatedElement
getAnnotatedElement, getAnnotation, getDeclaredAnnotations, isAnnotationPresent
 
Methods inherited from class org.jvnet.annox.model.XAnnotated
getAnnotations, getXAnnotations, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.reflect.AnnotatedElement
getAnnotation, getAnnotations, getDeclaredAnnotations, isAnnotationPresent
 

Field Detail

EMPTY_ARRAY

public static final XMethod[] EMPTY_ARRAY
Empty array of methods.

Constructor Detail

XMethod

public XMethod(Method method,
               XAnnotation[] xannotations,
               XParameter[] parameters)
Constructs an annotated method.

Parameters:
method - target method.
xannotations - annotations of the target method.
parameters - annotated method parameters.
Method Detail

getParameters

public XParameter[] getParameters()
Returns annotated parameters of the method.

Returns:
Annotated parameters of the method.

getMethod

public Method getMethod()
Returns the target methid.

Returns:
Target method.

getParameterAnnotations

public Annotation[][] getParameterAnnotations()
Description copied from interface: ParameterizedAnnotatedElement
Returns an array of arrays that represent the annotations on the formal parameters, in declaration order, of the method represented by this parameterized annotated element. (Returns an array of length zero if the underlying element is parameterless. If the method has one or more parameters, a nested array of length zero is returned for each parameter with no annotations.) The caller of this method is free to modify the returned arrays; it will have no effect on the arrays returned to other callers.

Specified by:
getParameterAnnotations in interface ParameterizedAnnotatedElement
Returns:
an array of arrays that represent the annotations on the formal parameters, in declaration order.


Copyright © 2006-2011 Highsource. All Rights Reserved.