Java Javascript Mozilla Library isContained(AstNode mayAncestor, AstNode filial)

Here you can find the source of isContained(AstNode mayAncestor, AstNode filial)

Description

is Contained

License

Open Source License

Declaration

public static boolean isContained(AstNode mayAncestor, AstNode filial) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import org.mozilla.javascript.ast.AstNode;

public class Main {
    public static boolean isContained(AstNode mayAncestor, AstNode filial) {
        AstNode node = filial;//  w ww .j  a  v a  2s  .  c  om
        while (node != null) {
            if (node.equals(mayAncestor))
                return true;
            node = node.getParent();
        }

        return false;
    }
}

Related

  1. getStaticProperty(Scriptable mixin, String name)
  2. getStringArgument(Object[] args, int pos, boolean allowNull)
  3. getStringValue(AstNode element)
  4. getXhtmlLinks(Object xhtml)
  5. grabContextFactoryGlobalSetter()
  6. isDefined(final Object object)
  7. isName(AstNode node, String value)
  8. isNullNativeObject(Object val)
  9. isPrototypeNameNode(AstNode node)