Class AnnotatedWithParams

    • Field Detail

      • _paramAnnotations

        protected final AnnotationMap[] _paramAnnotations
        Annotations associated with parameters of the annotated entity (method or constructor parameters)
    • Method Detail

      • addOrOverride

        public final void addOrOverride​(Annotation a)
        Method called to override a class annotation, usually due to a mix-in annotation masking or overriding an annotation 'real' class
      • addOrOverrideParam

        public final void addOrOverrideParam​(int paramIndex,
                                             Annotation a)
        Method called to override a method parameter annotation, usually due to a mix-in annotation masking or overriding an annotation 'real' method has.
      • addIfNotPresent

        public final void addIfNotPresent​(Annotation a)
        Method called to augment annotations, by adding specified annotation if and only if it is not yet present in the annotation map we have.
      • replaceParameterAnnotations

        protected AnnotatedParameter replaceParameterAnnotations​(int index,
                                                                 AnnotationMap ann)
        Method called by parameter object when an augmented instance is created; needs to replace parameter with new instance
        Since:
        1.9
      • getParameterAnnotations

        public final AnnotationMap getParameterAnnotations​(int index)
      • getParameterCount

        public abstract int getParameterCount()
      • getParameterClass

        public abstract Class<?> getParameterClass​(int index)
      • getParameterType

        public abstract Type getParameterType​(int index)
      • resolveParameterType

        public final JavaType resolveParameterType​(int index,
                                                   TypeBindings bindings)
        Method called to fully resolve type of one of parameters, given specified type variable bindings.
        Since:
        1.8
      • getAnnotationCount

        public final int getAnnotationCount()
      • call

        public abstract Object call()
                             throws Exception
        Method that can be used to (try to) call this object without arguments. This may succeed or fail, depending on expected number of arguments: caller needs to take care to pass correct number. Exceptions are thrown directly from actual low-level call.

        Note: only works for constructors and static methods.

        Throws:
        Exception
        Since:
        1.9
      • call

        public abstract Object call​(Object[] args)
                             throws Exception
        Method that can be used to (try to) call this object with specified arguments. This may succeed or fail, depending on expected number of arguments: caller needs to take care to pass correct number. Exceptions are thrown directly from actual low-level call.

        Note: only works for constructors and static methods.

        Throws:
        Exception
        Since:
        1.9
      • call1

        public abstract Object call1​(Object arg)
                              throws Exception
        Method that can be used to (try to) call this object with single arguments. This may succeed or fail, depending on expected number of arguments: caller needs to take care to pass correct number. Exceptions are thrown directly from actual low-level call.

        Note: only works for constructors and static methods.

        Throws:
        Exception
        Since:
        1.9