There are three ways to retrieve a Class object. // By way of an object Class cls = object.getClass(); // By way of a string try { cls = Class.forName("java.lang.String"); } catch (ClassNotFoundException e) { } // By way of .class cls = java.lang.String.class;