/** * <p>Looks up a <code>Method</code> based off the specified method * name and <code>params</code>.</p> * @param name the name of the <cod>Method</code> * @param params the <code>Method</code> parameters * @return the <code>Method</code> appropriate to the specified * name and parameters or <code>null</code> */ public Method lookupMethod(String name, Class<?>... params) { Map<Integer,Method> map = methods.get(name); Integer key = getKey(params); Method result = null; if ((null == map) || null == (result = map.get(key))) { map = declaredMethods.get(name); if (null != map) { result = map.get(key); } } return result; }
/** * <p>Looks up a <code>Method</code> based off the specified method * name and <code>params</code>.</p> * @param name the name of the <cod>Method</code> * @param params the <code>Method</code> parameters * @return the <code>Method</code> appropriate to the specified * name and parameters or <code>null</code> */ public Method lookupMethod(String name, Class<?>... params) { Map<Integer,Method> map = methods.get(name); Integer key = getKey(params); Method result = null; if ((null == map) || null == (result = map.get(key))) { map = declaredMethods.get(name); if (null != map) { result = map.get(key); } } return result; }
/** * <p>Looks up a <code>Method</code> based off the specified method * name and <code>params</code>.</p> * @param name the name of the <cod>Method</code> * @param params the <code>Method</code> parameters * @return the <code>Method</code> appropriate to the specified * name and parameters or <code>null</code> */ public Method lookupMethod(String name, Class<?>... params) { Map<Integer,Method> map = methods.get(name); Integer key = getKey(params); Method result = null; if ((null == map) || null == (result = map.get(key))) { map = declaredMethods.get(name); if (null != map) { result = map.get(key); } } return result; }
constructors = new HashMap<>(ctors.length, 1.0f); for (int i = 0, len = ctors.length; i < len; i++) { constructors.put(getKey(ctors[i].getParameterTypes()), ctors[i]); methods.put(name, methodsMap); methodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]); declaredMethods.put(name, declaredMethodsMap); declaredMethodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]);
constructors = new HashMap<Integer,Constructor>(ctors.length, 1.0f); for (int i = 0, len = ctors.length; i < len; i++) { constructors.put(getKey(ctors[i].getParameterTypes()), ctors[i]); methods.put(name, methodsMap); methodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]); declaredMethods.put(name, declaredMethodsMap); declaredMethodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]);
constructors = new HashMap<>(ctors.length, 1.0f); for (int i = 0, len = ctors.length; i < len; i++) { constructors.put(getKey(ctors[i].getParameterTypes()), ctors[i]); methods.put(name, methodsMap); methodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]); declaredMethods.put(name, declaredMethodsMap); declaredMethodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]);
constructors = new HashMap<>(ctors.length, 1.0f); for (int i = 0, len = ctors.length; i < len; i++) { constructors.put(getKey(ctors[i].getParameterTypes()), ctors[i]); methods.put(name, methodsMap); methodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]); declaredMethods.put(name, declaredMethodsMap); declaredMethodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]);
constructors = new HashMap<Integer,Constructor>(ctors.length, 1.0f); for (int i = 0, len = ctors.length; i < len; i++) { constructors.put(getKey(ctors[i].getParameterTypes()), ctors[i]); methods.put(name, methodsMap); methodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]); declaredMethods.put(name, declaredMethodsMap); declaredMethodsMap.put(getKey(meths[i].getParameterTypes()), meths[i]);
/** * <p>Looks up a <code>Method</code> based off the specified method * name and <code>params</code>.</p> * @param name the name of the <cod>Method</code> * @param params the <code>Method</code> parameters * @return the <code>Method</code> appropriate to the specified * name and parameters or <code>null</code> */ public Method lookupMethod(String name, Class<?>... params) { Map<Integer,Method> map = methods.get(name); Integer key = getKey(params); Method result = null; if ((null == map) || null == (result = map.get(key))) { map = declaredMethods.get(name); if (null != map) { result = map.get(key); } } return result; }
/** * <p>Looks up a <code>Method</code> based off the specified method * name and <code>params</code>.</p> * @param name the name of the <cod>Method</code> * @param params the <code>Method</code> parameters * @return the <code>Method</code> appropriate to the specified * name and parameters or <code>null</code> */ public Method lookupMethod(String name, Class<?>... params) { Map<Integer,Method> map = methods.get(name); Integer key = getKey(params); Method result = null; if ((null == map) || null == (result = map.get(key))) { map = declaredMethods.get(name); if (null != map) { result = map.get(key); } } return result; }
/** * <p>Looks up a <code>Constructor</code> based off the specified * <code>params</code>.</p> * @param params constructor parameters * @return the <code>Constructor</code> appropriate to the specified * parameters or <code>null</code> */ public Constructor<?> lookupConstructor(Class<?>... params) { return constructors.get(getKey(params)); }
/** * <p>Looks up a <code>Constructor</code> based off the specified * <code>params</code>.</p> * @param params constructor parameters * @return the <code>Constructor</code> appropriate to the specified * parameters or <code>null</code> */ public Constructor<?> lookupConstructor(Class<?>... params) { return constructors.get(getKey(params)); }
/** * <p>Looks up a <code>Constructor</code> based off the specified * <code>params</code>.</p> * @param params constructor parameters * @return the <code>Constructor</code> appropriate to the specified * parameters or <code>null</code> */ public Constructor<?> lookupConstructor(Class<?>... params) { return constructors.get(getKey(params)); }
/** * <p>Looks up a <code>Constructor</code> based off the specified * <code>params</code>.</p> * @param params constructor parameters * @return the <code>Constructor</code> appropriate to the specified * parameters or <code>null</code> */ public Constructor lookupConstructor(Class<?>... params) { return constructors.get(getKey(params)); }
/** * <p>Looks up a <code>Constructor</code> based off the specified * <code>params</code>.</p> * @param params constructor parameters * @return the <code>Constructor</code> appropriate to the specified * parameters or <code>null</code> */ public Constructor lookupConstructor(Class<?>... params) { return constructors.get(getKey(params)); }