public static int jsHash ( Object jsObj ) { if ( jsObj == null ) { return 1 ; } // Concatenated strings in Rhino have a different type. We need to manually // resolve to String semantics, which is what the following lines do. if ( jsObj instanceof ConsString ) { return jsObj . toString ( ) . hashCode ( ) ; } return ( jsObj instanceof ScriptableObject ) ? jsScriptableObjectHashCode ( ( ScriptableObject ) jsObj ) : jsObj . hashCode ( ) ; }
Deep - hash of an object .