Say I have a method declaration like:
private void someMethod(final String someKey, final Object dataType){
// Some code
}
I want to call it like:
someMethod("SomeKey", String);
someMethod("SomeKey", Date);
I can it do it in different ways like declaring an int with different values representing the type, an enum, or the like.
But can I just pass the type itself?
EDIT:
To elaborate, I can do like:
someMethod("SomeKey", 1); // 1 = String
someMethod("SomeKey", 2); // 2 = Date
This doesn't look good.