Java Javascript Mozilla Library isNullNativeObject(Object val)

Here you can find the source of isNullNativeObject(Object val)

Description

is Null Native Object

License

Apache License

Declaration

private static boolean isNullNativeObject(Object val) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import org.mozilla.javascript.Undefined;
import org.mozilla.javascript.UniqueTag;

public class Main {
    private static boolean isNullNativeObject(Object val) {
        if (val instanceof UniqueTag) {
            if (UniqueTag.NOT_FOUND.equals(val)) {
                //Tag to mark non-existing values.
                return true;
            } else if (UniqueTag.NULL_VALUE.equals(val)) {
                //Tag to distinguish between uninitialized and null values.
                return true;
            }/*from   w w  w . ja  v a  2s.  c  om*/
        } else if (val instanceof Undefined) {
            // Undefined --> null
            return true;
        }
        return false;
    }
}

Related

  1. getXhtmlLinks(Object xhtml)
  2. grabContextFactoryGlobalSetter()
  3. isContained(AstNode mayAncestor, AstNode filial)
  4. isDefined(final Object object)
  5. isName(AstNode node, String value)
  6. isPrototypeNameNode(AstNode node)
  7. isPrototypePropertyGet(PropertyGet pg)
  8. isSimplePropertyGet(PropertyGet pg, String expectedObj, String expectedField)
  9. isStaticProperty(Scriptable property)