I have a baseclass, Statement, which several other classes inherit from, named IfStatement, WhereStatement, etc... What is the best way t
Statement
IfStatement
WhereStatement
Try this:
if (Statement.class.isInstance(obj)) { doStuffWithStatements((Statement) obj)); }
since Class.isInstance() method takes an object instance as a parameter.