InvocationTargetException,
IllegalAccessException,
InstantiationException
{
synchronized (_javaClassWrappers) {
JavaClassDef def = _javaClassWrappers.get(name);
if (def == null) {
if (log.isLoggable(Level.FINEST)) {
if (extension == null)
log.finest(L.l("PHP loading class {0} with type {1}",
name,
type.getName()));
else
log.finest(L.l(
"PHP loading class {0} with type {1} providing extension {2}",
name,
type.getName(),
extension));
}
if (javaClassDefClass != null) {
Constructor<?> constructor
= javaClassDefClass.getConstructor(ModuleContext.class,
String.class,
Class.class);
def = (JavaClassDef) constructor.newInstance(this, name, type);
}
else {
def = JavaClassDef.create(this, name, type);
if (def == null)
def = createDefaultJavaClassDef(name, type, extension);
}
def.setPhpClass(true);
_javaClassWrappers.put(name, def);
// _lowerJavaClassWrappers.put(name.toLowerCase(Locale.ENGLISH), def);
_staticClasses.put(name, def);