Example :
List list = new ArrayList(); //This would give me the class name for the list reference variable. list.getClass().getSi
Class aClass = ... //obtain Class object. Class[] interfaces = aClass.getInterfaces();