All Implemented Interfaces:
Serializable
Direct Known Subclasses:
AnnotatedConstructor, AnnotatedMethod

public abstract class AnnotatedWithParams extends AnnotatedMember
Intermediate base class that encapsulates features that constructors and methods share.
See Also:
  • Field Details

    • _paramAnnotations

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

  • Method Details

    • 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.
    • 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
    • getParameterAnnotations

      public final AnnotationMap getParameterAnnotations(int index)
    • getParameter

      public final AnnotatedParameter getParameter(int index)
    • getParameterCount

      public abstract int getParameterCount()
    • getRawParameterType

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

      public abstract JavaType getParameterType(int index)
      Since:
      2.7
    • getGenericParameterType

      @Deprecated public abstract Type getGenericParameterType(int index)
      Deprecated.
      Since 2.7, remove in 2.9
    • 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
    • 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
    • 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