Is it possible in java to obtain ConcreetClass.class
from interface reference ISomeInterface
. I would like to avoid 'instance of' keyword.
On other words, is there:
ISomeInterface intRef = new ConcreetClass();
Class realization = intRef.getRealizationClass();
realization == ConcreetClass.class; // true
If java doesn't support this operation. Could you recommend me a way to deal with it?