in cdi-weld/src/main/java/org/apache/aries/cdi/weld/BundleResourcesLoader.java [127:147]
public Class<?> defineClass(Class<?> originalClass, String className, byte[] classBytes, int off, int len, ProtectionDomain protectionDomain) throws ClassFormatError {
try {
java.lang.reflect.Method method;
Object[] args;
if (protectionDomain == null) {
method = defineClass1;
args = new Object[]{className, classBytes, 0, len};
} else {
method = defineClass2;
args = new Object[]{className, classBytes, 0, len, protectionDomain};
}
Class<?> clazz = (Class<?>) method.invoke(_classLoader, args);
return clazz;
} catch (RuntimeException e) {
throw e;
} catch (java.lang.reflect.InvocationTargetException e) {
throw new RuntimeException(e.getTargetException());
} catch (Exception e) {
throw new RuntimeException(e);
}
}