private final String getMethodSourceCode( CtMethod iFunctionMethod, 
					      String internalReferenceName,  
					      CtClass targetObjectCtClass,
					      Class firstArgumentTypeClass ) throws Exception{

	CtClass params[]     = iFunctionMethod.getParameterTypes();
	CtClass exceptions[] = iFunctionMethod.getExceptionTypes();

	StringBuffer paramsListBuffer = new StringBuffer( 10 * params.length );
	StringBuffer paramsNameBuffer = new StringBuffer( 10 * params.length );
	StringBuffer exceptionsBuffer = new StringBuffer( 10 * exceptions.length );
	String firstParamName = null;

	for( int i = 0; i < params.length; i++ ){
	    // compute the name of this parameter
	    String currentParamName = String.format( "parameter_%d", i );
	    if( i == 0 )
		firstParamName = currentParamName;


	    paramsListBuffer.append( String.format( "%s %s %s", 
						    ( i > 0 ? "," : "" ),
						    params[ i ].getName(),
						    currentParamName )
				     );

	    paramsNameBuffer.append( String.format( "%s %s", 
						    ( i > 0 ? "," : "" ),
						    currentParamName )
				     );

	    
	}

	for( int i = 0; i < exceptions.length; i++ ){
	    exceptionsBuffer.append( String.format( "%s %s", 
						    ( i > 0 ? "," : "" ),
						    exceptions[ i ].getName() )
				     );
	}


	StringBuffer methodBodySourceCode = new StringBuffer( 500 );

	// do I have to generate a check statament to ensure the first argument
	// is of the specified type?
	if( firstArgumentTypeClass != null ){
	    methodBodySourceCode.append( String.format( "if( %s == null || ( ! ( %s instanceof %s) ) ){ throw new %s(%s); }",
							firstParamName,
							firstParamName,
							firstArgumentTypeClass.getName(),
							JFKException.class.getName(),
							" \"The binding object is not of the right type!\" "
							)
					 );
	}

	// generate the assignment of the first parameter to the internal refernce
	methodBodySourceCode.append( String.format( " %s = (%s) %s; ",
						    internalReferenceName,
						    targetObjectCtClass.getName(),
						    firstParamName
						    ) 
				     );

	// generate the source code of the method body
	return String.format( "%s %s %s( %s ) %s { %s }",
			      "public",
			      iFunctionMethod.getReturnType().getName(),
			      iFunctionMethod.getName(),
			      paramsListBuffer.toString(),
			      ( exceptions.length > 0 ? String.format( " throws %s", exceptionsBuffer.toString() ) : "" ),
			      methodBodySourceCode.toString()
			      );
	
    }