Open feroult opened 8 years ago
Right now, we can't create a generic hook for a generic base class like this:
public abstract class BaseAggregator<T extends SomeClass> { }
public class BaseHook<T extends SomeClass> extends Hook<BaseAggregator<T> { }
To support this scenario, it is necessary to change the following ReflectionUtils method:
ReflectionUtils
public static Class<?> getFeatureTypeArgumentAt(Class<?> clazz, int index) { Type superClassGenericType = getGenericTypeArgumentAt(clazz.getGenericSuperclass(), index); if (superClassGenericType instanceof TypeVariable) { return (Class<?>) getGenericTypeBound(clazz, ((TypeVariable) superClassGenericType).getName()); } return (Class<?>) superClassGenericType; }
Probably could replace that method with something like Java Classmate. Shouldn't be hard.
Right now, we can't create a generic hook for a generic base class like this:
To support this scenario, it is necessary to change the following
ReflectionUtils
method: