public List < Field > getAllFields ( final Method method , final Object [ ] arg1 ) { final Annotation [ ] [ ] parameterAnnotations = method . getParameterAnnotations ( ) ; List < Field > actionItems = new ArrayList < Field > ( ) ; int i = 0 ; String paramName = null ; String paramValue = null ; Class < ? > paramType ; for ( final Annotation [ ] annotations : parameterAnnotations ) { final Object object = arg1 [ i ++ ] ; //paramValue = ObjectToStringSerializer.(object); paramType = object . getClass ( ) ; for ( final Annotation annotation : annotations ) { if ( annotation instanceof AuditField ) { final AuditField field = ( AuditField ) annotation ; paramName = field . field ( ) ; } else if ( annotation instanceof DeIdentify ) { final DeIdentify deidentify = ( DeIdentify ) annotation ; paramValue = DeIdentifyUtil . deidentify ( paramValue , deidentify . left ( ) , deidentify . right ( ) , deidentify . fromLeft ( ) , deidentify . fromRight ( ) ) ; } } if ( null == paramName ) { paramName = "arg" + ( i - 1 ) ; } Field field = new Field ( ) ; field . setName ( paramName ) ; field . setValue ( paramValue ) ; field . setType ( paramType . getName ( ) ) ; actionItems . add ( field ) ; paramName = null ; paramValue = null ; } return actionItems ; }
Gets the all params .