private List < Field > getFields ( final Method method , final Object [ ] params ) { final Annotation [ ] [ ] parameterAnnotations = method . getParameterAnnotations ( ) ; final List < Field > fields = new ArrayList < Field > ( ) ; int i = 0 ; String paramName = null ; for ( final Annotation [ ] annotations : parameterAnnotations ) { final Object object = params [ i ++ ] ; boolean ignoreFlag = false ; DeIdentify deidentify = null ; for ( final Annotation annotation : annotations ) { if ( annotation instanceof IgnoreAudit ) { ignoreFlag = true ; break ; } if ( annotation instanceof AuditField ) { final AuditField field = ( AuditField ) annotation ; paramName = field . field ( ) ; } if ( annotation instanceof DeIdentify ) { deidentify = ( DeIdentify ) annotation ; } } if ( ignoreFlag ) { } else { if ( null == paramName ) { paramName = "arg" + i ; } serializer . serialize ( fields , object , paramName , deidentify ) ; } paramName = null ; } return fields ; }
Extract fields based on annotations .