@Override public List<Signature> load(Class<?> clazz) throws Exception { List<Signature> sup; Class<?> sc = clazz.getSuperclass(); if (sc == null) sup = Collections.emptyList(); else if (sc == Object.class) sup = OBJECT_METHODS; else sup = METHODS.get(sc); Method[] methods = clazz.isInterface() ? clazz.getMethods() : clazz.getDeclaredMethods(); final List<Signature> thisMethods = new ArrayList<Signature>(methods.length); for (Method method : methods) { if (!(method.isSynthetic() || method.isBridge())) { thisMethods.add(new Signature(method)); } } return Lists.newLinkedList(concat(thisMethods, Iterables.filter(sup, new Predicate<Signature>() { @Override public boolean apply(Signature input) { int pos = thisMethods.indexOf(input); if (pos == -1) return true; Signature override = thisMethods.get(pos); return !overrides(override.method, input.method); } }))); } });
@Override public List<Signature> load(Class<?> clazz) throws Exception { List<Signature> sup; Class<?> sc = clazz.getSuperclass(); if (sc == null) sup = Collections.emptyList(); else if (sc == Object.class) sup = OBJECT_METHODS; else sup = METHODS.get(sc); Method[] methods = clazz.isInterface() ? clazz.getMethods() : clazz.getDeclaredMethods(); final List<Signature> thisMethods = new ArrayList<Signature>(methods.length); for (Method method : methods) { if (!(method.isSynthetic() || method.isBridge())) { thisMethods.add(new Signature(method)); } } return Lists.newLinkedList(concat(thisMethods, Iterables.filter(sup, new Predicate<Signature>() { @Override public boolean apply(Signature input) { int pos = thisMethods.indexOf(input); if (pos == -1) return true; Signature override = thisMethods.get(pos); return !overrides(override.method, input.method); } }))); } });
@Override public List<Signature> load(Class<?> clazz) throws Exception { List<Signature> sup; Class<?> sc = clazz.getSuperclass(); if (sc == null) sup = Collections.emptyList(); else if (sc == Object.class) sup = OBJECT_METHODS; else sup = METHODS.get(sc); Method[] methods = clazz.isInterface() ? clazz.getMethods() : clazz.getDeclaredMethods(); final List<Signature> thisMethods = new ArrayList<Signature>(methods.length); for (Method method : methods) { if (!(method.isSynthetic() || method.isBridge())) { thisMethods.add(new Signature(method)); } } return Lists.newLinkedList(concat(thisMethods, Iterables.filter(sup, new Predicate<Signature>() { @Override public boolean apply(Signature input) { int pos = thisMethods.indexOf(input); if (pos == -1) return true; Signature override = thisMethods.get(pos); return !overrides(override.method, input.method); } }))); } });
@Override public Signature apply(Method from) { return new Signature(from); } }));
@Override public Signature apply(Method from) { return new Signature(from); } }));
@Override public Signature apply(Method from) { return new Signature(from); } }));