Is there a way to determine if an object is an instance of a generic type?
public test(Object obj) { if (obj instanceof T) { ... }
To extend the sample of Mark Peters, often you want to do something like:
Class type; //maybe passed to the method if ( type.isInstance(obj) ) { T t = type.cast(obj); // ... }