@Override
    public IFunction bindFunction(final Object target, final String name )
    throws CannotBindFunctionException {
	// check arguments
	if( (target == null) || (name == null) || (name.length() < 0) )
	    throw new CannotBindFunctionException("Cannot bind the method call to a function on " + target.getClass() + " for identifier " + name);

	// create a key for the cache entry
	final String cacheKey = target.getClass().getName() + "_" + name;

	// check if the function is already in the cache
	if( cache.containsKey(cacheKey) )
	    return cache.get(cacheKey);


	// now iterate on each public method to see if one of the target object has the annotation
	// of a function with the specified name, and in such case prepare to get the function object
	for( final Method currentMethod : target.getClass().getMethods() )
	    if( currentMethod.isAnnotationPresent( Function.class ) ){
		final Function functionAnnotation = currentMethod.getAnnotation( Function.class );



		if( functionAnnotation.name().equals( name ) ){
		    // ok, this method must be mapped as a function!!    

		    try {
			// get a new function definer and build the function
			final IFunctionClassDefiner definer = (IFunctionClassDefiner) JFK.getBean( IFunctionClassDefiner.class );
			final Class functionClass = definer.getIFunctionClassDefinition(target, currentMethod);

			// now create the instance
			final IFunction function = (IFunction) functionClass.newInstance();

			// set the target object
			((IFunctionBinder) function ).setTargetObject(target);

			// all done
			cache.put(cacheKey, function);
			return function;

		    } catch (final Exception e){
			throw new CannotBindFunctionException("Cannot create the function object ", e);
		    }
		}

	    }


	// if here there is no method to map as a function
	throw new CannotBindFunctionException("No method found to be mapped as " + name + " on " + target.getClass() );

    }