I think maybe using Generics is not the approach you need
Unfortunately, I do need to use generics for my implementation, because, in so doing, I can manage complexity and redundancy much more efficiently than with the standard object model.
If you stay within Class based objects then using lets say the TOBJECT as the base of any derived class you could then use the AS and IS operators which are RTTI features to determine the class type at runtime.
If I know that <T> will always be replaced with a class type (and I know this), could I use "as" and "is" anyways?
Alternately I came across the classnameis function. Would this be possible?
if T.classnameis('type1') then
dothis(v)
else if T.classnameis('type2') then
dothat(v)
else if T.classnameis('type3')then
dosomething(v);