if ("Date".equals(s.getClassName())) {
String className = s.getClassName(); if ("Date".equals(className)) {
    public void put(String name, Scriptable start, Object value) {        if (node == null) {            // redirect the scripted constructor to __constructor__,            // constructor is set to the native constructor method.            if ("constructor".equals(name) && value instanceof NativeFunction) {                name = "__constructor__";            }            // register property for PropertyRecorder interface            if (isRecording) {                changedProperties.add(name);            }            super.put(name, start, value);        } else {            checkNode();            if ("subnodeRelation".equals(name)) {                node.setSubnodeRelation(value == null ? null : value.toString());            }            if (value instanceof Wrapper) {                value = ((Wrapper) value).unwrap();            }            if ((value == null) || (value == Undefined.instance)) {                node.unset(name);            } else if (value instanceof Scriptable) {                Scriptable s = (Scriptable) value;                if ("Date".equals(s.getClassName())) {                    node.setDate(name, new Date((long) ScriptRuntime.toNumber(s)));                } else if ("String".equals(s.getClassName())) {                    node.setString(name, ScriptRuntime.toString(s));                } else if ("Number".equals(s.getClassName())) {                    node.setFloat(name, ScriptRuntime.toNumber(s));                } else if ("Boolean".equals(s.getClassName())) {                    node.setBoolean(name, ScriptRuntime.toBoolean(s));                } else {                    node.setJavaObject(name, s);                }            } else if (value instanceof String) {                node.setString(name, value.toString());            } else if (value instanceof Boolean) {                node.setBoolean(name, ((Boolean) value).booleanValue());            } else if (value instanceof Number) {                node.setFloat(name, ((Number) value).doubleValue());            } else if (value instanceof Date) {                node.setDate(name, (Date) value);            } else if (value instanceof INode) {                node.setNode(name, (INode) value);            } else {                node.setJavaObject(name, value);            }        }    }