I have this method:
public static Object filterObject(Object object, String objectName){
...
}
And here is how to I call it:
Entity1 entity1 = new Entity1();
//Call some setters
Test.filterObject(entity1, "Entity1");
I want to cast Object
into Entity1
inside of that method. How can I do this?
Edit
My question is how can I convert object
into an instance of objectName
class?