I don't know how to perform type checking on newEntry, I want to make sure that it is of type MyTable (without creating an object of MyTable).
public static boolean add(String table, Object newEntry)
{
boolean result;
if (table.equals("MyTable") && newEntry.getClass() == MyTable.getClass())
{
...
}
}
My problem is:
newEntry.getClass() == MyTable.getClass().
Note: MyTable is a class name, not an object.