Tabnine Logo
Node
Code IndexAdd Tabnine to your IDE (free)

How to use
Node
in
com.oracle.js.parser.ir

Best Java code snippets using com.oracle.js.parser.ir.Node (Showing top 18 results out of 315)

origin: org.netbeans.modules/org-netbeans-modules-javascript2-doc

/**
 * Gets parameters of the method.
 * @param node of the javaScript code
 * @return list of parameters, never {@code null}
 */
public List<DocParameter> getParameters(Node node) {
  JsComment comment = getCommentForOffset(node.getStart(), getCommentBlocks());
  if (comment != null) {
    return comment.getParameters();
  }
  return Collections.<DocParameter>emptyList();
}

origin: org.netbeans.modules/org-netbeans-modules-javascript2-model

public String getFQN(Node expression, ModelBuilder builder) {
  exp.clear();
  this.builder = builder;
  expression.accept(this);
  StringBuilder sb = new StringBuilder();
  for(String part : exp){
    sb.append(part);
    sb.append('.');
  }
  if (sb.length() == 0) {
    LOGGER.log(Level.FINE, "New operator withouth name: {0}", expression.toString()); //NOI18N
    return null;
  }
  return sb.toString().substring(0, sb.length() - 1);
}
origin: org.netbeans.modules/org-netbeans-modules-javascript2-model

public static OffsetRange getOffsetRange(Node node) {
  return new OffsetRange(node.getStart(), node.getFinish());
}

origin: org.netbeans.modules/org-netbeans-modules-javascript2-model

int findOffset (Node expression) {
  expression.accept(this);
  return typeOffset;
} 

origin: org.netbeans.modules/org-netbeans-modules-javascript2-model

public Set<TypeUsage> getSemiTypes(Node expression, ModelBuilder builder) {
  this.builder = builder;
  exp = new ArrayList<String>();
  result = new HashMap<String, TypeUsage>();
  reset();
  expression.accept(this);
  add(exp, typeOffset == -1 ? offsetVisitor.findOffset(expression) : typeOffset, false);
  return new HashSet<TypeUsage>(result.values());
}

origin: org.netbeans.modules/org-netbeans-modules-javascript2-doc

/**
 * Gets properties of the object from comment.
 * @param node of the javaScript code
 * @return list of properties defined in the comment, never {@code null}
 */
public List<DocParameter> getProperties(Node node) {
  JsComment comment = getCommentForOffset(node.getStart(), getCommentBlocks());
  if (comment != null) {
    return comment.getProperties();
  }
  return Collections.<DocParameter>emptyList();
}
origin: org.netbeans.modules/org-netbeans-modules-javascript2-model

  } else {
    types = new ArrayList<TypeUsage>();
    types.add(new TypeUsage(parameter, rhs.getStart(), false));
    property.addAssignment(type, lhs.getStart() + 5);
JsObject lObject = null;
boolean indexNodeReferProperty = false;
int assignmentOffset = lhs.getFinish();
if (lhs instanceof IndexNode) {
  IndexNode iNode = (IndexNode)lhs;
origin: org.netbeans.modules/org-netbeans-modules-javascript2-model

@Override
public boolean enterTernaryNode(TernaryNode ternaryNode) {
  ternaryNode.getTrueExpression().accept(this);
  add(exp, offsetVisitor.findOffset(ternaryNode.getTrueExpression()), false);
  reset();
  Node third = ternaryNode.getFalseExpression();
  third.accept(this);
  int typeStart = offsetVisitor.findOffset(third);
  add(exp, typeStart, false);
  reset();
  return false;
}
origin: org.netbeans.modules/org-netbeans-modules-javascript2-doc

/**
 * Gets the set of modifiers attached to given node.
 * @param node examined node
 * @return {@code Set} of modifiers, never {@code null}
 */
public Set<JsModifier> getModifiers(Node node) {
  JsComment comment = getCommentForOffset(node.getStart(), getCommentBlocks());
  if (comment != null) {
    return comment.getModifiers();
  }
  return Collections.<JsModifier>emptySet();
}
origin: org.netbeans.modules/org-netbeans-modules-javascript2-model

rhs.accept(this);
rhs.accept(this);
if (rhs instanceof IdentNode) {
origin: org.netbeans.modules/org-netbeans-modules-javascript2-doc

/**
 * Gets list of super classes defined by documentation for the given node.
 * @param node examined node
 * @return {@code List} of super classes, never {@code null}
 */
public List<Type> getExtends(Node node) {
  JsComment comment = getCommentForOffset(node.getStart(), getCommentBlocks());
  if (comment != null) {
    return comment.getExtends();
  }
  return Collections.<Type>emptyList();
}
origin: org.netbeans.modules/org-netbeans-modules-javascript2-doc

/**
 * Says whether is examined node (probably function node) class, constructor or not.
 * @param node examined node
 * @return {@code true} if the comment says "it's a class", {@code false} otherwise
 */
public boolean isClass(Node node) {
  JsComment comment = getCommentForOffset(node.getStart(), getCommentBlocks());
  if (comment != null) {
    return comment.isClass();
  }
  return false;
}

origin: org.netbeans.modules/org-netbeans-modules-javascript2-doc

/**
 * Says whether is examined node constant.
 * @param node examined node
 * @return {@code true} if the comment says "it's a constant", {@code false} otherwise
 */
public boolean isConstant(Node node) {
  JsComment comment = getCommentForOffset(node.getStart(), getCommentBlocks());
  if (comment != null) {
    return comment.isConstant();
  }
  return false;
}
origin: org.netbeans.modules/org-netbeans-modules-javascript2-doc

/**
 * Says whether is code at given code depricated or not.
 * @param node examined node
 * @return {@code true} if the comment says "it's deprecated", {@code false} otherwise
 */
public boolean isDeprecated(Node node) {
  JsComment comment = getCommentForOffset(node.getStart(), getCommentBlocks());
  if (comment != null) {
    return comment.getDeprecated() != null;
  }
  return false;
}
origin: org.netbeans.modules/org-netbeans-modules-javascript2-doc

/**
 * Gets documentation for given Node.
 * @param node of the javaScript code
 * @return documentation text if any {@code null} otherwise
 */
public Documentation getDocumentation(Node node) {
  JsComment comment = getCommentForOffset(node.getStart(), getCommentBlocks());
  if (comment != null) {
    String content = JsDocumentationPrinter.printDocumentation(comment);
    if (!content.isEmpty()) {
      return Documentation.create(content);
    }
  }
  return null;
}
origin: org.netbeans.modules/org-netbeans-modules-javascript2-doc

/**
 * Gets possible return types get for the node.
 * @param node of the javaScript code
 * @return list of potential return types, never {@code null}
 */
public List<Type> getReturnType(Node node) {
  JsComment comment = getCommentForOffset(node.getStart(), getCommentBlocks());
  if (comment != null && comment.getReturnType() != null) {
    return comment.getReturnType().getParamTypes();
  }
  return Collections.<Type>emptyList();
}
origin: org.netbeans.modules/org-netbeans-modules-javascript2-model

if (ln.isString()) {
  result.add(FunctionArgumentAccessor.getDefault().createForString(
      position, argument.getStart(), ln.getString()));
} else if (ln instanceof LiteralNode.ArrayLiteralNode) {
  for (JsObjectImpl jsObject: functionArguments) {
    if (jsObject.getOffset() == argument.getStart()) {
      result.add(FunctionArgumentAccessor.getDefault().createForArray(position, jsObject.getOffset(), jsObject));
      break;
  if (jsObject.getOffset() == argument.getStart()) {
    result.add(FunctionArgumentAccessor.getDefault().createForAnonymousObject(position, jsObject.getOffset(), jsObject));
    break;
if(fillName((AccessNode) argument, strFqn)) {
  result.add(FunctionArgumentAccessor.getDefault().createForReference(
      position, argument.getStart(), strFqn));
} else {
  result.add(FunctionArgumentAccessor.getDefault().createForUnknown(position));
if(fillName((IndexNode) argument, strFqn)) {
  result.add(FunctionArgumentAccessor.getDefault().createForReference(
      position, argument.getStart(), strFqn));
} else {
  result.add(FunctionArgumentAccessor.getDefault().createForUnknown(position));
String inName = in.getName();
result.add(FunctionArgumentAccessor.getDefault().createForReference(
    position, argument.getStart(),
    Collections.singletonList(inName)));
origin: org.netbeans.modules/org-netbeans-modules-javascript2-model

int aOffset = fqName == null ? lastVisited.getStart() : fqName.get(fqName.size() - 1).getOffsetRange().getEnd();
array.addAssignment(ModelUtils.resolveSemiTypeOfExpression(modelBuilder, lNode), aOffset);
for (Node item : aNode.getElementExpressions()) {
com.oracle.js.parser.irNode

Most used methods

  • getStart
  • accept
  • getFinish
  • toString

Popular in Java

  • Making http requests using okhttp
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • compareTo (BigDecimal)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • BufferedReader (java.io)
    Wraps an existing Reader and buffers the input. Expensive interaction with the underlying reader is
  • Collectors (java.util.stream)
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now