Code example for Constructor

Methods: getParameterTypesnewInstance

0
	} 
	 
    public Object parse(String source, Class klass, IDataParserContext context) throws XSWTException {
    	Constructor cons = getConstructor(klass);
    	if (cons != null) {
    		args[0] = context.parse(source, cons.getParameterTypes()[0]);
    		try { 
				return cons.newInstance(args);
			} catch (InstantiationException e) {
			} catch (IllegalArgumentException e) {
			} catch (IllegalAccessException e) {
			} catch (InvocationTargetException e) {
			} 
    	} 
    	return null; 
    } 
} 
Contextual code suggestions in your IDE  Get Codota for Java