Is there a way to determine if an object is an instance of a generic type?
public test(Object obj) { if (obj instanceof T) { ... }
The only way you can do this check is if you have the Class object representing the type:
Class
Class type; //maybe passed into the method if ( type.isInstance(obj) ) { //... }