-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Given an interface like:
public interface MetaController<T extends SendableMotorController> extends SendableMotorController {
T getController();
}where T can itself be MetaController<U> (where U is not T), I need a method that can traverse this chain and return the class that is at the bottom of the chain (i.e., not something implementing MetaController).
Knowing Java's type system limitations, it likely can't return a different class it determines at runtime, but could perhaps be able to do it with an auxiliary object like so:
public class Box<T> {
private T obj;
public T get() {
return obj;
}
}Metadata
Metadata
Assignees
Labels
No labels