Class AnnotationMethodScan<MethodAnno extends java.lang.Class<? extends java.lang.annotation.Annotation>,ParamAnno extends java.lang.Class<? extends java.lang.annotation.Annotation>>
- java.lang.Object
-
- com.github.frtu.spring.annotation.AnnotationMethodScan<MethodAnno,ParamAnno>
-
- Type Parameters:
MethodAnno- Annotation class used on methodParamAnno- 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.ObjectResult of an annotation method scanAnnotationMethodScanner.scan(Method).- Since:
- 1.0.1
- See Also:
- Moved from log-platform project
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.lang.Object>annotationAttributesstatic AnnotationMethodScanEMPTYprivate java.lang.reflect.Methodmethodprivate java.lang.annotation.Annotation[]paramAnnotation
-
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 booleanequals(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.MethodgetMethod()The scannedMethod.<ParamAnno extends java.lang.annotation.Annotation>
ParamAnno[]getParamAnnotations()Array of annotations from each fields.inthashCode()booleanisEmpty()Is AnnotationMethodScan contains nothing.static booleanisEmpty(AnnotationMethodScan annotationMethodScan)Is AnnotationMethodScan contains nothing.java.lang.StringtoString()
-
-
-
Field Detail
-
EMPTY
public static final AnnotationMethodScan EMPTY
-
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
-
-
Method Detail
-
getMethod
public java.lang.reflect.Method getMethod()
The scannedMethod.- 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- anAnnotationMethodScan- Returns:
- if contains nothing
- Since:
- 1.0.2
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-