Examples of MethodKey


Examples of org.apache.commons.jexl2.internal.introspection.MethodKey

    }

    /** {@inheritDoc} */
    @Override
    public Object tryExecute(String name, Object obj, Object[] args) {
        MethodKey tkey = new MethodKey(name, args);
        // let's assume that invocation will fly if the declaring class is the
        // same and arguments have the same type
        if (objectClass.equals(obj.getClass()) && tkey.equals(key)) {
            try {
                return execute(obj, args);
            } catch (InvocationTargetException xinvoke) {
                return TRY_FAILED; // fail
            } catch (IllegalAccessException xill) {
View Full Code Here

Examples of org.apache.commons.jexl2.internal.introspection.MethodKey

     * @return a filled up parameter (may contain a null method)
     */
    private static Parameter discover(Introspector is,
            Object obj, String method, Object[] args) {
        final Class<?> clazz = obj.getClass();
        final MethodKey key = new MethodKey(method, args);
        java.lang.reflect.Method m = is.getMethod(clazz, key);
        if (m == null && clazz.isArray()) {
            // check for support via our array->list wrapper
            m = is.getMethod(ArrayListWrapper.class, key);
        }
View Full Code Here

Examples of org.apache.commons.jexl2.internal.introspection.MethodKey

    }

    /** {@inheritDoc} */
    @Override
    public Object tryExecute(String name, Object o, Object[] args) {
        MethodKey tkey = new MethodKey(name, args);
        // let's assume that invocation will fly if the declaring class is the
        // same and arguments have the same type
        if (objectClass.equals(o.getClass()) && tkey.equals(key)) {
            try {
                return execute(o, args);
            } catch (InvocationTargetException xinvoke) {
                return TRY_FAILED; // fail
            } catch (IllegalAccessException xill) {
View Full Code Here

Examples of org.apache.commons.jexl2.internal.introspection.MethodKey

     * @return a filled up parameter (may contain a null method)
     */
    private static Parameter discover(Introspector is,
            Object obj, String method, Object[] args) {
        final Class<?> clazz = obj.getClass();
        final MethodKey key = new MethodKey(method, args);
        java.lang.reflect.Method m = is.getMethod(clazz, key);
        if (m == null && clazz.isArray()) {
            // check for support via our array->list wrapper
            m = is.getMethod(ArrayListWrapper.class, key);
        }
View Full Code Here

Examples of org.apache.commons.jexl2.internal.introspection.MethodKey

     * @return The desired Method object.
     * @throws IllegalArgumentException When the parameters passed in can not be used for introspection.
     * CSOFF: RedundantThrows
     */
    protected final Method getMethod(Class<?> c, String name, Object[] params) throws IllegalArgumentException {
        return base().getMethod(c, new MethodKey(name, params));
    }
View Full Code Here

Examples of org.apache.commons.jexl2.internal.introspection.MethodKey

        } else if (ctorHandle != null) {
            className = ctorHandle.toString();
        } else {
            return null;
        }
        return base().getConstructor(clazz, new MethodKey(className, args));
    }
View Full Code Here

Examples of org.apache.commons.jexl2.internal.introspection.MethodKey

    /** the list of keys we generated & test against */
    private static final MethodKey[] keyList;
   
    /** Creates & inserts a key into the byKey & byString map */
    private static void setUpKey(String name, Class<?>[] parms) {
        MethodKey key = new MethodKey(name, parms);
        String str = key.toString();
        byKey.put(key, str);
        byString.put(str, key);
       
    }
View Full Code Here

Examples of org.apache.commons.jexl2.internal.introspection.MethodKey

    }
   
    /** Checks that a string key does exist */
    void checkStringKey(String method, Class<?>... params) {
        String key = makeStringKey(method, params);
        MethodKey out = byString.get(key);
        assertTrue(out != null);
    }
View Full Code Here

Examples of org.apache.commons.jexl2.internal.introspection.MethodKey

        assertTrue(out != null);
    }
       
    /** Builds a method key */
    MethodKey makeKey(String method, Class<?>... params) {
        return new MethodKey(method, params);
    }
View Full Code Here

Examples of org.apache.commons.jexl2.internal.introspection.MethodKey

        return new MethodKey(method, params);
    }
   
    /** Checks that a method key exists */
    void checkKey(String method, Class<?>... params) {
        MethodKey key = makeKey(method, params);
        String out = byKey.get(key);
        assertTrue(out != null);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.