protected Object getResourceInternal(IConfigurableResourceContext cxt) throws OpenConfigurationException { try { return cxt.getClassLoader().loadClass(className).newInstance(); } catch (Throwable t) { throw new OpenConfigurationException("Error creating " + className, getUri(), t); } }
protected Object getResourceInternal(IConfigurableResourceContext cxt) throws OpenConfigurationException { try { return cxt.getClassLoader().loadClass(className).newInstance(); } catch (Throwable t) { throw new OpenConfigurationException("Error creating " + className, getUri(), t); } }
public void validate(IConfigurableResourceContext cxt) throws OpenConfigurationException { Class<?> c = validateClassExistsAndPublic(className, cxt.getClassLoader(), getUri()); if (getExtendsClassName() != null) { Class<?> c2 = validateClassExistsAndPublic(getExtendsClassName(), cxt.getClassLoader(), getUri()); validateSuper(c, c2, getUri()); } validateHaveNewInstance(c, getUri()); }
public void validate(IConfigurableResourceContext cxt) throws OpenConfigurationException { Class<?> c = validateClassExistsAndPublic(className, cxt.getClassLoader(), getUri()); if (getExtendsClassName() != null) { Class<?> c2 = validateClassExistsAndPublic(getExtendsClassName(), cxt.getClassLoader(), getUri()); validateSuper(c, c2, getUri()); } validateHaveNewInstance(c, getUri()); }