* Rename asJavaObject() to toJava().

This commit is contained in:
hns 2007-03-30 09:30:59 +00:00
parent dbcb600857
commit 2b5d5c089b

View file

@ -74,7 +74,7 @@ public class GlobalObject extends ImporterTopLevel implements PropertyRecorder {
"getXmlDocument", "getHtmlDocument", "seal", "getXmlDocument", "getHtmlDocument", "seal",
"getDBConnection", "getURL", "write", "writeln", "getDBConnection", "getURL", "write", "writeln",
"serialize", "deserialize", "defineLibraryScope", "serialize", "deserialize", "defineLibraryScope",
"wrapJavaMap", "unwrapJavaMap", "asJavaObject" "wrapJavaMap", "unwrapJavaMap", "toJava"
}; };
defineFunctionProperties(globalFuncs, GlobalObject.class, DONTENUM | READONLY | PERMANENT); defineFunctionProperties(globalFuncs, GlobalObject.class, DONTENUM | READONLY | PERMANENT);
@ -436,7 +436,7 @@ public class GlobalObject extends ImporterTopLevel implements PropertyRecorder {
* @return the object wrapped as NativeJavaObject, exposing * @return the object wrapped as NativeJavaObject, exposing
* the public methods of the underlying class. * the public methods of the underlying class.
*/ */
public Object asJavaObject(Object obj) { public Object toJava(Object obj) {
if (obj == null || obj instanceof NativeJavaObject if (obj == null || obj instanceof NativeJavaObject
|| obj == Undefined.instance) { || obj == Undefined.instance) {
return obj; return obj;