Class AnnotationMethodScan<MethodAnno extends java.lang.Class<? extends java.lang.annotation.Annotation>,​ParamAnno extends java.lang.Class<? extends java.lang.annotation.Annotation>>

  • Type Parameters:
    MethodAnno - Annotation class used on method
    ParamAnno - Annotation class used on method parameter

    public class AnnotationMethodScan<MethodAnno extends java.lang.Class<? extends java.lang.annotation.Annotation>,​ParamAnno extends java.lang.Class<? extends java.lang.annotation.Annotation>>
    extends java.lang.Object
    Result of an annotation method scan AnnotationMethodScanner.scan(Method).
    Since:
    1.0.1
    See Also:
    Moved from log-platform project
    • Constructor Summary

      Constructors 
      Constructor Description
      AnnotationMethodScan​(java.lang.reflect.Method method, java.util.Map<java.lang.String,​java.lang.Object> annotationAttributes, java.lang.annotation.Annotation[] paramAnnotation)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      java.util.Map<java.lang.String,​java.lang.Object> getAnnotationAttributes()
      Raw fields contained in the method annotation.
      <NestedAnno extends java.lang.annotation.Annotation>
      NestedAnno[]
      getAnnotationValueArray()
      Shortcut for annotation field 'value' that returns an array of annotations.
      java.lang.reflect.Method getMethod()
      The scanned Method.
      <ParamAnno extends java.lang.annotation.Annotation>
      ParamAnno[]
      getParamAnnotations()
      Array of annotations from each fields.
      int hashCode()  
      boolean isEmpty()
      Is AnnotationMethodScan contains nothing.
      static boolean isEmpty​(AnnotationMethodScan annotationMethodScan)
      Is AnnotationMethodScan contains nothing.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • method

        private java.lang.reflect.Method method
      • annotationAttributes

        private java.util.Map<java.lang.String,​java.lang.Object> annotationAttributes
      • paramAnnotation

        private java.lang.annotation.Annotation[] paramAnnotation
    • Constructor Detail

      • AnnotationMethodScan

        AnnotationMethodScan​(java.lang.reflect.Method method,
                             java.util.Map<java.lang.String,​java.lang.Object> annotationAttributes,
                             java.lang.annotation.Annotation[] paramAnnotation)
    • Method Detail

      • getMethod

        public java.lang.reflect.Method getMethod()
        The scanned Method.
        Returns:
        method scanned
      • getAnnotationAttributes

        public java.util.Map<java.lang.String,​java.lang.Object> getAnnotationAttributes()
        Raw fields contained in the method annotation.
        Returns:
        KV of all the annotation fields
      • getAnnotationValueArray

        public <NestedAnno extends java.lang.annotation.Annotation> NestedAnno[] getAnnotationValueArray()
        Shortcut for annotation field 'value' that returns an array of annotations.
        Type Parameters:
        NestedAnno - Nested annotation type for 'value'
        Returns:
        all the annotations object
      • getParamAnnotations

        public <ParamAnno extends java.lang.annotation.Annotation> ParamAnno[] getParamAnnotations()
        Array of annotations from each fields.

        ATTENTION : ParamAnno[i] can be null if parameter index i doesn't have annotation.

        Type Parameters:
        ParamAnno - Annotation class used on method parameter
        Returns:
        Empty array when no annotation found
      • isEmpty

        public boolean isEmpty()
        Is AnnotationMethodScan contains nothing.
        Returns:
        if contains nothing
        Since:
        1.0.2
      • isEmpty

        public static boolean isEmpty​(AnnotationMethodScan annotationMethodScan)
        Is AnnotationMethodScan contains nothing.
        Parameters:
        annotationMethodScan - an AnnotationMethodScan
        Returns:
        if contains nothing
        Since:
        1.0.2
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object