I am determining what method to call by using the runtime class. My problem is whenever I pass in a null object, obviously it will throw a null reference exception. How are you able to determine at runtime the class of a null object. Although its null i need to do further processing, and woud rather not pass in type as a parameter to the method.
Here's an example
public void test(){
Long nullLong = null;
addParameter(nullLong);
}
public void addParameter(Object value) {
String parameterType = value.getClass().getName();
//do some stuff here with parameterType
}