List of usage examples for jdk.nashorn.internal.ir VarNode getInit
public Expression getInit()
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); }/* w w w . j a v a2 s .c o m*/ } } } } return false; }