private GenericInfo<T> applyArguments0(Type[] actualArguments) { Map<TypeVariable<?>, Type> genericArgumentMap = cloneGenericArgumentMap(); Map<TypeVariable<?>, List<Listener>> listenerMapping = cloneListenerMapping(); GenericInfo<T> genericInfo = new GenericInfo<T>(genericArgumentMap, listenerMapping, representingClass); genericInfo.doApplyArguments(actualArguments); return genericInfo; }
private void addGenericInterfaces(Class<?> clazz) { Type[] genericInterfaces = clazz.getGenericInterfaces(); for (Type genericInterface : genericInterfaces) { if (genericInterface instanceof ParameterizedType) { ParameterizedType pt = (ParameterizedType) genericInterface; Class<?> interf = (Class<?>) pt.getRawType(); addGenericInterfaces(interf); doApplyArguments(interf, pt.getActualTypeArguments()); } } }
private void doApplyArguments(Type[] actualArguments) { doApplyArguments(representingClass, actualArguments); }