Package org.jvnet.jaxb.annox.model
Class XConstructor
- java.lang.Object
-
- org.jvnet.jaxb.annox.model.XAnnotated
-
- org.jvnet.jaxb.annox.model.XAnnotatedElement<T>
-
- org.jvnet.jaxb.annox.model.XMember<Constructor<?>>
-
- org.jvnet.jaxb.annox.model.XConstructor
-
- All Implemented Interfaces:
AnnotatedElement,ParameterizedAnnotatedElement
public class XConstructor extends XMember<Constructor<?>> implements ParameterizedAnnotatedElement
Defines an annotated constructor.- Author:
- Aleksei Valikov
-
-
Field Summary
Fields Modifier and Type Field Description static XConstructor[]EMPTY_ARRAYEmpty array of constructors.
-
Constructor Summary
Constructors Constructor Description XConstructor(Constructor<?> constructor, XAnnotation<?>[] xannotations, XParameter[] parameters)Constructs an annotated constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Constructor<?>getConstructor()Returns the target constructor.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.jaxb.annox.model.XMember
equals, getMember, getName, hashCode
-
Methods inherited from class org.jvnet.jaxb.annox.model.XAnnotatedElement
getAnnotatedElement, getAnnotation, getDeclaredAnnotations, isAnnotationPresent
-
Methods inherited from class org.jvnet.jaxb.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, getAnnotationsByType, getDeclaredAnnotation, getDeclaredAnnotations, getDeclaredAnnotationsByType, isAnnotationPresent
-
-
-
-
Field Detail
-
EMPTY_ARRAY
public static final XConstructor[] EMPTY_ARRAY
Empty array of constructors.
-
-
Constructor Detail
-
XConstructor
public XConstructor(Constructor<?> constructor, XAnnotation<?>[] xannotations, XParameter[] parameters)
Constructs an annotated constructor.- Parameters:
constructor- target constructor.xannotations- constructor annotations.parameters- annotated constructor parameters.
-
-
Method Detail
-
getParameters
public XParameter[] getParameters()
Returns annotated parameters of the method.- Returns:
- Annotated parameters of the method.
-
getConstructor
public Constructor<?> getConstructor()
Returns the target constructor.- Returns:
- Target constructor.
-
getParameterAnnotations
public Annotation[][] getParameterAnnotations()
Description copied from interface:ParameterizedAnnotatedElementReturns 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:
getParameterAnnotationsin interfaceParameterizedAnnotatedElement- Returns:
- an array of arrays that represent the annotations on the formal parameters, in declaration order.
-
-