This utility method exist in OmniFaces 2.0, but it was slightly improved in OmniFaces 2.1.
[OmniFaces utilities] The
Classinstance associated with the class of the given string, using the context class loader and if that fails the defining class loader of the current class. Just pass in the fully qualified class name of the class for which a
Classinstance needs to be created.
// example 1, fully qualified class name: book.beans.BookBean
Class<BookBean> bookBean = (Class<BookBean>) Reflection.toClass("book.beans.BookBean");
// example 2, fully qualified class name: javax.faces.component.UIInput
Class<UIInput> uiInput = (Class<UIInput>) Reflection.toClass("javax.faces.component.UIInput");