private final String getSourceCodeForDelegateMethod( Method delegating, String referenceName, String delegatedName ){

	// if no delegated suppose the delegate has the same properties
	// of the delegating method
	if( delegatedName == null || delegatedName.isEmpty() )
	    delegatedName = delegating.getName();

	// what return type does this method have?
	Class currentReturnType   = delegating.getReturnType();
	Class[] currentParameters = delegating.getParameterTypes();
	Class[] currentExceptions = delegating.getExceptionTypes();

	// build a list of parameters
	StringBuffer paramsNameBuffer = new StringBuffer( 10 * currentParameters.length );
	StringBuffer paramsListBuffer = new StringBuffer( 10 * currentParameters.length );
	for( int z = 0; z < currentParameters.length; z++ ){
	    Class currentParameterType = currentParameters[ z ];
	    String currentParName = String.format( "delegateParameter%d", z );

	    paramsNameBuffer.append( String.format( "%s %s %s",
						    ( z > 0 ? "," : "" ),
						    currentParameterType.getName(),
						    currentParName )
				     );

	    paramsListBuffer.append( String.format( "%s %s", ( z > 0 ? "," : "" ), currentParName ) );
								    
	}


	StringBuffer exceptionBuffer = new StringBuffer( 10 * currentExceptions.length );
	for( int z = 0; z < currentExceptions.length; z++ )
	    exceptionBuffer.append( String.format( "%s %s", ( z > 0 ? "," : "" ), currentExceptions[ z ].getName() ) );



	return String.format( "%s %s %s( %s ) %s  { %s %s.%s( %s ); }",
			      Modifier.toString( delegating.getModifiers() ).replace( "abstract", "" ), // remove abstract modifier!
			      currentReturnType.getName().toString(),
			      delegating.getName(),
			      paramsNameBuffer.toString(),
			      ( currentExceptions.length > 0 ? String.format( "throws %s", exceptionBuffer.toString() ) :  "" ),
			      ("void".equals( currentReturnType.toString() ) ? "" : "return"),
			      referenceName,
			      delegatedName,
			      paramsListBuffer.toString()
			      );

    }