140141142143144145146147148149150
int getDistance(T t) { Integer d = distanceMap.get(t.getClass()); if (d != null) return d; DeclaringClassInterfacePair p = ReflectionHelper.getClass( t.getClass(), c); Class[] as = ReflectionHelper.getParameterizedClassArguments(p); Class a = (as != null) ? as[0] : null; d = 0;
197198199200201202203204205206207
} }); } private Type getParameterizedType(Class c) { DeclaringClassInterfacePair p = ReflectionHelper.getClass( c, ContextResolver.class); Type[] as = ReflectionHelper.getParameterizedTypeArguments(p); return (as != null) ? as[0] : Object.class;
194195196197198199200201202203204
126127128129130131132133134135136