class ReflectionUtils {

    public static Class<?> findFixClass(String ruleKey)
            throws InstantiationException, IllegalAccessException, ClassNotFoundException {
        Reflections reflections = new Reflections("com.tmobile");
        Set<Class<?>> allRules = reflections.getTypesAnnotatedWith(PacmanFix.class);
        for (Class<?> ruleClass : allRules) {
            PacmanFix rule = ruleClass.getAnnotation(PacmanFix.class);
            if (rule.key().equals(ruleKey)) {
                return ruleClass;
            }
        }
        // if code reached here , this means no class found associated to this
        // key
        throw new ClassNotFoundException("cannot find class associated to rule");
    }

}