public Thread currentThread() {
return Thread.currentThread();
}
public ProtoObject resolveObject(String name) {
SmalltalkClassLoader smalltalkClassLoader = classLoader();
try {
ProtoObject object = smalltalkClassLoader.loadSmalltalkClass(name, false);
if (object != null)
return object;
if (Character.isUpperCase(name.charAt(0))) {
String fullyQualifiedName = importFor(name);
if (fullyQualifiedName != null) {
if (fullyQualifiedName.startsWith("#")) {
// fullyQualifiedName here is actually Java class name.
// return adaptorClassForJavaClassNamed(fullyQualifiedName.substring(1));
throw new IllegalStateException("TODO - JCL");
} else
return resolveObject(fullyQualifiedName);
}
}
// It is expected the loading of an object results in the registering of
// a Smalltalk class in the class registry.
object = smalltalkClassLoader.loadSmalltalkClass(name, true);
if (object != null)
return smalltalkClassLoader.loadSmalltalkClass(name, false);
throw new IllegalStateException("Error: Class '" + name + "' should have been resolved by here.");
} catch (ClassNotFoundException e) {
throw new RuntimeException(e);
}
}