@SuppressWarnings("unchecked")
    private static Method getMethodOfInterest(Object cmp, Class<? extends Annotation> ann) {
        Class cmpClass = cmp.getClass();
        Class infoClass = infoClass(cmpClass);
        Method[] ms = infoClass.getMethods();
        for (Method m : ms) {
            if (m.getAnnotation(ann) != null) {
                if (m.getReturnType() != Void.TYPE || m.getParameterTypes().length > 0) {
                    throw new IllegalArgumentException("Invalid Method signature: " + m);
                }
                try {
                    return cmpClass.getMethod(m.getName());
                } catch (Exception ex) {
                    throw new ComponentException("Cannot find/access method: " + m);
                }
            }
        }
        throw new IllegalArgumentException("No " + ann.getCanonicalName() + " found in " + cmp.getClass());
    }