Example usage for jdk.nashorn.internal.ir VarNode getName

List of usage examples for jdk.nashorn.internal.ir VarNode getName

Introduction

In this page you can find the example usage for jdk.nashorn.internal.ir VarNode getName.

Prototype

public IdentNode getName() 

Source Link

Document

Get the identifier for the variable

Usage

From source file:com.bearsoft.org.netbeans.modules.form.JsCodeGenerator.java

private boolean isFormObjectExistsInJs(FunctionNode constructor) {
    if (constructor != null && constructor.getBody() != null) {
        for (Statement st : constructor.getBody().getStatements()) {
            if (st instanceof VarNode) {
                VarNode vn = (VarNode) st;
                if (FORM_OBJECT_NAME.equals(vn.getName().getName())) {
                    if (vn.getInit() instanceof CallNode) {
                        CallNode cn = (CallNode) vn.getInit();
                        return FormModuleCompletionContext.isSystemObjectMethod(cn,
                                FormModuleCompletionContext.LOAD_FORM_METHOD_NAME);
                    }/*from www. j  av a 2  s  .  c  o  m*/
                }
            }
        }
    }
    return false;
}