private static Object getObject ( final String className ) { try { // we get the class coresponding to the life cycle name final Class < ? > clazz = Class . forName ( className ) ; // we get the default constructor (with no parameter) final Constructor < ? > contructor = clazz . getConstructor ( new Class [ ] { } ) ; // we create an instance of the class using the constructor return contructor . newInstance ( new Object [ ] { } ) ; } catch ( final Exception e ) { e . printStackTrace ( ) ; } return null ; }
We instanciate the Component