public Method findMethod()

in src/main/java/org/apache/maven/shared/utils/introspection/ClassMap.java [87:118]


    public Method findMethod(String name, Object... params) throws MethodMap.AmbiguousException {
        String methodKey = makeMethodKey(name, params);
        Object cacheEntry = methodCache.get(methodKey);

        if (cacheEntry == CACHE_MISS) {
            return null;
        }

        if (cacheEntry == null) {
            try {
                cacheEntry = methodMap.find(name, params);
            } catch (MethodMap.AmbiguousException ae) {
                /*
                 *  that's a miss :)
                 */

                methodCache.put(methodKey, CACHE_MISS);

                throw ae;
            }

            if (cacheEntry == null) {
                methodCache.put(methodKey, CACHE_MISS);
            } else {
                methodCache.put(methodKey, cacheEntry);
            }
        }

        // Yes, this might just be null.

        return (Method) cacheEntry;
    }