Class Namespace

    • Constructor Detail

      • Namespace

        private Namespace()
    • Method Detail

      • exportAsJSClass

        public void exportAsJSClass​(boolean sealed)
      • uri

        public java.lang.String uri()
      • prefix

        public java.lang.String prefix()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toLocaleString

        public java.lang.String toLocaleString()
      • equals

        private boolean equals​(Namespace n)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equivalentValues

        protected java.lang.Object equivalentValues​(java.lang.Object value)
        Description copied from class: ScriptableObject
        Custom == operator. Must return Scriptable.NOT_FOUND if this object does not have custom equality operator for the given value, Boolean.TRUE if this object is equivalent to value, Boolean.FALSE if this object is not equivalent to value.

        The default implementation returns Boolean.TRUE if this == value or Scriptable.NOT_FOUND otherwise. It indicates that by default custom equality is available only if value is this in which case true is returned.

        Overrides:
        equivalentValues in class ScriptableObject
      • getClassName

        public java.lang.String getClassName()
        Description copied from class: ScriptableObject
        Return the name of the class.

        This is typically the same name as the constructor. Classes extending ScriptableObject must implement this abstract method.

        Specified by:
        getClassName in interface Scriptable
        Specified by:
        getClassName in class ScriptableObject
      • getDefaultValue

        public java.lang.Object getDefaultValue​(java.lang.Class<?> hint)
        Description copied from class: ScriptableObject
        Implements the [[DefaultValue]] internal method.

        Note that the toPrimitive conversion is a no-op for every type other than Object, for which [[DefaultValue]] is called. See ECMA 9.1.

        A hint of null means "no hint".

        Specified by:
        getDefaultValue in interface Scriptable
        Overrides:
        getDefaultValue in class ScriptableObject
        Parameters:
        hint - the type hint
        Returns:
        the default value for the object

        See ECMA 8.6.2.6.

      • getInstanceIdValue

        protected java.lang.Object getInstanceIdValue​(int id)
        Description copied from class: IdScriptableObject
        Get id value. * If id value is constant, descendant can call cacheIdValue to store * value in the permanent cache. * Default implementation creates IdFunctionObject instance for given id * and cache its value
        Overrides:
        getInstanceIdValue in class IdScriptableObject
      • newNamespace

        Namespace newNamespace​(java.lang.String uri)
      • newNamespace

        Namespace newNamespace​(java.lang.String prefix,
                               java.lang.String uri)
      • constructNamespace

        Namespace constructNamespace​(java.lang.Object uriValue)
      • castToNamespace

        Namespace castToNamespace​(java.lang.Object namespaceObj)
      • constructNamespace

        private Namespace constructNamespace​(java.lang.Object prefixValue,
                                             java.lang.Object uriValue)
      • constructNamespace

        private Namespace constructNamespace()
      • jsConstructor

        private java.lang.Object jsConstructor​(Context cx,
                                               boolean inNewExpr,
                                               java.lang.Object[] args)
      • js_toSource

        private java.lang.String js_toSource()
      • toSourceImpl

        static void toSourceImpl​(java.lang.String prefix,
                                 java.lang.String uri,
                                 java.lang.StringBuilder sb)