I'm trying to figure out a mechanism to implement something like the following in Java. Essentially, I'd like to use the argument to a generic class as a generic class:
class A<T> {
T<String> aString;
}
Is this, or something equivalent, where I can pass arguments to the type constructor received as arguments, possible at all in Java? Is it possible to indicate that T
has type * -> *
or that it is some sort of type constructor? If not, how about a different language?