public String getArgDecl ( HashMap < String , TypeMirror > bindingMap ) { StringBuffer sb = new StringBuffer ( ) ; if ( _methodDecl . getParameters ( ) == null ) return "" ; int i = 0 ; for ( ParameterDeclaration paramDecl : _methodDecl . getParameters ( ) ) { TypeMirror paramType = paramDecl . getType ( ) ; if ( paramType == null ) return "" ; if ( bindingMap != null && bindingMap . containsKey ( paramType . toString ( ) ) ) paramType = bindingMap . get ( paramType . toString ( ) ) ; if ( i != 0 ) sb . append ( ", " ) ; sb . append ( paramType . toString ( ) ) ; sb . append ( ' ' ) ; // BUGBUG: when the MethodDeclaration is derived from Reflection, this seems // to return 'arg0' for all arguments! String argName = paramDecl . getSimpleName ( ) ; if ( argName . equals ( "arg0" ) ) sb . append ( "arg" + i ) ; else sb . append ( argName ) ; i ++ ; } return sb . toString ( ) ; }
Returns the argument declaration of the method applying the bindings in the provided type map to any parameter types