Code example for InvocationTargetException

Methods: getCause

0
	public void addTransformer(ClassFileTransformer transformer) {
		try { 
			this.addTransformerMethod.invoke(this.classLoader, transformer);
		} 
		catch (InvocationTargetException ex) {
			throw new IllegalStateException("GlassFish addTransformer method threw exception", ex.getCause());
		} 
		catch (Exception ex) {
			throw new IllegalStateException("Could not invoke GlassFish addTransformer method", ex);
		} 
	} 
 
	@Override 
	public ClassLoader getInstrumentableClassLoader() {
		return this.classLoader;
	} 
 
	@Override 
	public ClassLoader getThrowawayClassLoader() {
		try { 
Contextual code suggestions in your IDE  Get Codota for Java