// Path: src/main/java/javascript/ScriptHelper.java
// public final class ScriptHelper {
//     
//     /**
//      * Sets a key/value pair of <code>Object</type> type.
//      */
//     public static native void put(String s, Object value);
//     
//     /**
//      * Sets a key/value pair of <code>boolean</code> type.
//      */
//     public static native void put(String s, boolean value);
//     
//     /**
//      * Sets a key/value pair of <code>primitive</code> type,
//      * except of type <code>boolean</code>.
//      */
//     public static native void put(String s, double value);
//     
//     //public static native Object get(String s);
// 
//     /**
//      * Executes the specified script.
//      * <b>Important</b>: In the current version the script must be a string literal.
//      * 
//      * @return the object returned by the JavaScript code
//      */
//     public static native Object eval(String script);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns an int.
//      */
//     public static native int evalInt(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a long.
//      */
//     public static native long evalLong(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns float.
//      */
//     public static native float evalFloat(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a double.
//      */
//     public static native double evalDouble(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a char.
//      */
//     public static native char evalChar(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a boolean.
//      */
//     public static native boolean evalBoolean(String jsCode);
// }


import javascript.ScriptHelper;
/*
 * Copyright (c) 2005 Wolfgang Kuehn
 */

package java.lang;


/**
 * Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.
 */
public class Object {

    private static int hashCodeCount = 0;
    private int hashCode = Object.hashCodeCount++;
    
    public Object() {
    }
    
    public Object clone() {
        String className = (String) ScriptHelper.eval("this.clazz.name"); 
        
        // Special treatment for arrays, because for those we have no class to
        // overwrite the clone() method.
        if (className.startsWith("[")) {
            return ScriptHelper.eval("j2js.cloneArray(this)");
        }
        
        return null;
    }
    
    public boolean equals(Object obj) {
        return this == obj;
    }
    
// Path: src/main/java/javascript/ScriptHelper.java
// public final class ScriptHelper {
//     
//     /**
//      * Sets a key/value pair of <code>Object</type> type.
//      */
//     public static native void put(String s, Object value);
//     
//     /**
//      * Sets a key/value pair of <code>boolean</code> type.
//      */
//     public static native void put(String s, boolean value);
//     
//     /**
//      * Sets a key/value pair of <code>primitive</code> type,
//      * except of type <code>boolean</code>.
//      */
//     public static native void put(String s, double value);
//     
//     //public static native Object get(String s);
// 
//     /**
//      * Executes the specified script.
//      * <b>Important</b>: In the current version the script must be a string literal.
//      * 
//      * @return the object returned by the JavaScript code
//      */
//     public static native Object eval(String script);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns an int.
//      */
//     public static native int evalInt(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a long.
//      */
//     public static native long evalLong(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns float.
//      */
//     public static native float evalFloat(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a double.
//      */
//     public static native double evalDouble(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a char.
//      */
//     public static native char evalChar(String jsCode);
//     
//     /**
//      * Same as {@link ScriptHelper#eval(String)}, but returns a boolean.
//      */
//     public static native boolean evalBoolean(String jsCode);
// }


// Path: src/main/java/java/lang/Object.java
import javascript.ScriptHelper;

/*
 * Copyright (c) 2005 Wolfgang Kuehn
 */

package java.lang;


/**
 * Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.
 */
public class Object {

    private static int hashCodeCount = 0;
    private int hashCode = Object.hashCodeCount++;
    
    public Object() {
    }
    
    public Object clone() {
        String className = (String) ScriptHelper.eval("this.clazz.name"); 
        
        // Special treatment for arrays, because for those we have no class to
        // overwrite the clone() method.
        if (className.startsWith("[")) {
            return ScriptHelper.eval("j2js.cloneArray(this)");
        }
        
        return null;
    }
    
    public boolean equals(Object obj) {
        return this == obj;
    }
    
    public Class getClass() {