public static boolean hasFunction(Object object, String functionName, Class[] parameters) {
        boolean result = false;

        try {
            Method method = object.getClass().getMethod(functionName, parameters);

            if (method != null) {
                result = true;
            }
        } catch (NoSuchMethodException ex) {
            result = false;
        }

        return result;
    }
public static boolean hasFunction ( Object object , String functionName , Class [ ] parameters ) { boolean result = false ; try { Method method = object . getClass ( ) . getMethod ( functionName , parameters ) ; if ( method != null ) { result = true ; } } catch ( NoSuchMethodException ex ) { result = false ; } return result ; }
Checks if Instance has specified function

@param object       Instance which function would be checked
@param functionName function name
@param parameters   function parameters (array of Class)
@return true if function is present in Instance