Tabnine Logo
JCTree$JCMethodInvocation.getArguments
Code IndexAdd Tabnine to your IDE (free)

How to use
getArguments
method
in
com.sun.tools.javac.tree.JCTree$JCMethodInvocation

Best Java code snippets using com.sun.tools.javac.tree.JCTree$JCMethodInvocation.getArguments (Showing top 20 results out of 315)

origin: google/error-prone

List<JCExpression> arguments = methodInvocation.getArguments();
origin: google/error-prone

    : ((JCIdent) methodSelect).sym.owner.type;
return invocationTree.getArguments().isEmpty() // 0 arguments
origin: google/error-prone

@Override
public void visitApply(JCMethodInvocation tree) {
 JCExpression select = tree.getMethodSelect();
 if (select != null && select.toString().equals("Refaster.emitCommentBefore")) {
  String commentLiteral = (String) ((JCLiteral) tree.getArguments().get(0)).getValue();
  JCExpression expr = tree.getArguments().get(1);
  try {
   print("/* " + commentLiteral + " */ ");
  } catch (IOException e) {
   throw new RuntimeException(e);
  }
  expr.accept(this);
 } else {
  super.visitApply(tree);
 }
}
origin: org.projectlombok/lombok.ast

    AlternateConstructorInvocation aci = new AlternateConstructorInvocation();
    fillList(node.getTypeArguments(), aci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
    fillList(node.getArguments(), aci.rawArguments());
    set(node, aci);
    setConversionPositionInfo(aci, "this", getPosition(sel));
    SuperConstructorInvocation sci = new SuperConstructorInvocation();
    fillList(node.getTypeArguments(), sci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
    fillList(node.getArguments(), sci.rawArguments());
    set(node, sci);
    setConversionPositionInfo(sci, "super", getPosition(sel));
    SuperConstructorInvocation sci = new SuperConstructorInvocation();
    fillList(node.getTypeArguments(), sci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
    fillList(node.getArguments(), sci.rawArguments());
    sci.rawQualifier(toTree(((JCFieldAccess) sel).getExpression()));
    set(node, sci);
fillList(node.getArguments(), inv.rawArguments());
set(node, inv);
origin: com.android.tools.external.lombok/lombok-ast

    AlternateConstructorInvocation aci = new AlternateConstructorInvocation();
    fillList(node.getTypeArguments(), aci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
    fillList(node.getArguments(), aci.rawArguments());
    set(node, aci);
    setConversionPositionInfo(aci, "this", getPosition(sel));
    SuperConstructorInvocation sci = new SuperConstructorInvocation();
    fillList(node.getTypeArguments(), sci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
    fillList(node.getArguments(), sci.rawArguments());
    set(node, sci);
    setConversionPositionInfo(sci, "super", getPosition(sel));
    SuperConstructorInvocation sci = new SuperConstructorInvocation();
    fillList(node.getTypeArguments(), sci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
    fillList(node.getArguments(), sci.rawArguments());
    sci.rawQualifier(toTree(((JCFieldAccess) sel).getExpression()));
    set(node, sci);
fillList(node.getArguments(), inv.rawArguments());
set(node, inv);
origin: me.tatarka.retrolambda.projectlombok/lombok.ast

    AlternateConstructorInvocation aci = new AlternateConstructorInvocation();
    fillList(node.getTypeArguments(), aci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
    fillList(node.getArguments(), aci.rawArguments());
    set(node, aci);
    setConversionPositionInfo(aci, "this", getPosition(sel));
    SuperConstructorInvocation sci = new SuperConstructorInvocation();
    fillList(node.getTypeArguments(), sci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
    fillList(node.getArguments(), sci.rawArguments());
    set(node, sci);
    setConversionPositionInfo(sci, "super", getPosition(sel));
    SuperConstructorInvocation sci = new SuperConstructorInvocation();
    fillList(node.getTypeArguments(), sci.rawConstructorTypeArguments(), FlagKey.TYPE_REFERENCE);
    fillList(node.getArguments(), sci.rawArguments());
    sci.rawQualifier(toTree(((JCFieldAccess) sel).getExpression()));
    set(node, sci);
fillList(node.getArguments(), inv.rawArguments());
set(node, inv);
origin: com.google.errorprone/error_prone_core

List<JCExpression> arguments = methodInvocation.getArguments();
origin: com.google.errorprone/error_prone_check_api

    : ((JCIdent) methodSelect).sym.owner.type;
return invocationTree.getArguments().isEmpty() // 0 arguments
origin: com.google.errorprone/error_prone_core

private static void replaceAssert(
  SuggestedFix.Builder fix, AssertTree foundAssert, VisitorState state) {
 ExpressionTree expr = foundAssert.getCondition();
 expr = (ExpressionTree) TreeInfo.skipParens((JCTree) expr);
 // case: "assert !expr"
 if (expr.getKind().equals(LOGICAL_COMPLEMENT)) {
  addFix(fix, ((JCUnary) expr).getExpression(), foundAssert, state, IS_FALSE);
  return;
 }
 // case: "assert expr1.equals(expr2)"
 if (instanceMethod().onClass(Any.INSTANCE).named("equals").matches(expr, state)) {
  JCMethodInvocation equalsCall = ((JCMethodInvocation) expr);
  JCExpression expr1 = ((JCFieldAccess) ((JCMethodInvocation) expr).meth).selected;
  JCExpression expr2 = equalsCall.getArguments().get(0);
  addFix(
    fix,
    expr1,
    foundAssert,
    state,
    String.format(IS_EQUAL_TO, normalizedSourceForExpression(expr2, state)));
  return;
 }
 // case: "assert expr1 == expr2" or "assert expr1 != expr2"
 if (expr.getKind().equals(Kind.EQUAL_TO) || expr.getKind().equals(Kind.NOT_EQUAL_TO)) {
  suggestFixForSameReference(fix, foundAssert, state, expr.getKind().equals(Kind.EQUAL_TO));
  return;
 }
 // case: "assert expr", which didn't match any of the previous cases.
 addFix(fix, (JCExpression) expr, foundAssert, state, IS_TRUE);
}
origin: com.google.errorprone/error_prone_core

List<JCExpression> arguments = methodInvocation.getArguments();
Types types = state.getTypes();
if (arguments.size() != params.length()) {
origin: com.google.errorprone/error_prone_core

 @Override
 public Description matchMethodInvocation(
   MethodInvocationTree methodInvocationTree, VisitorState state) {
  if (!MATCHER.matches(methodInvocationTree, state)) {
   return Description.NO_MATCH;
  }
  if (methodInvocationTree.getArguments().size() % 2 == 0) {
   return Description.NO_MATCH;
  }
  JCMethodInvocation methodInvocation = (JCMethodInvocation) methodInvocationTree;
  List<JCExpression> arguments = methodInvocation.getArguments();

  Type typeVargs = methodInvocation.varargsElement;
  if (typeVargs == null) {
   return Description.NO_MATCH;
  }
  Type typeVarargsArr = state.arrayTypeForType(typeVargs);
  Type lastArgType = ASTHelpers.getType(Iterables.getLast(arguments));
  if (typeVarargsArr.equals(lastArgType)) {
   return Description.NO_MATCH;
  }
  return describeMatch(methodInvocationTree);
 }
}
origin: com.google.errorprone/error_prone_core

@Override
public void printStat(JCTree tree) throws IOException {
 if (tree instanceof JCExpressionStatement
   && ((JCExpressionStatement) tree).getExpression() instanceof JCMethodInvocation) {
  JCMethodInvocation invocation =
    (JCMethodInvocation) ((JCExpressionStatement) tree).getExpression();
  JCExpression select = invocation.getMethodSelect();
  if (select != null && select.toString().equals("Refaster.emitComment")) {
   String commentLiteral =
     (String) ((JCLiteral) invocation.getArguments().get(0)).getValue();
   print("// " + commentLiteral);
   return;
  }
 }
 super.printStat(tree);
}
origin: com.google.errorprone/error_prone_core

@Override
public void visitApply(JCMethodInvocation tree) {
 JCExpression select = tree.getMethodSelect();
 if (select != null && select.toString().equals("Refaster.emitCommentBefore")) {
  String commentLiteral = (String) ((JCLiteral) tree.getArguments().get(0)).getValue();
  JCExpression expr = tree.getArguments().get(1);
  try {
   print("/* " + commentLiteral + " */ ");
  } catch (IOException e) {
   throw new RuntimeException(e);
  }
  expr.accept(this);
 } else {
  super.visitApply(tree);
 }
}
origin: cincheo/jsweet

  if (invocationElement.getMethodName()
      .equals(JSweetConfig.INDEXED_SET_FUCTION_NAME)) {
    if (invocation.getArguments().size() == 3) {
      if ("this".equals(invocation.getArguments().get(0).toString())) {
        printIndent().print(invocation.args.tail.head).print(": ")
            .print(invocation.args.tail.tail.head).print(",").println();
    .create(invocation);
if (invocationElement.getMethodName().equals(JSweetConfig.INDEXED_SET_FUCTION_NAME)) {
  if (invocation.getArguments().size() == 3) {
    if ("this".equals(invocation.getArguments().get(0).toString())) {
      printIndent().print("target[").print(invocation.args.tail.head).print("]")
          .print(" = ").print(invocation.args.tail.tail.head).print(";")
origin: cincheo/jsweet

  isValid = false;
if (isValid && invocation.getArguments() != null) {
  for (int i = 0; i < invocation.getArguments().size(); i++) {
    JCExpression expr = invocation.getArguments().get(i);
    if (Util.isConstant(expr)) {
      defaultValues.put(i, expr);
origin: google/error-prone

JCMethodInvocation compareTo = (JCMethodInvocation) parent;
JCTree.JCExpression rhs = getOnlyElement(compareTo.getArguments());
origin: google/error-prone

sourceNode.getArguments().stream(),
(formal, actual) -> {
origin: google/error-prone

private static void replaceAssert(
  SuggestedFix.Builder fix, AssertTree foundAssert, VisitorState state) {
 ExpressionTree expr = foundAssert.getCondition();
 expr = (ExpressionTree) TreeInfo.skipParens((JCTree) expr);
 // case: "assert !expr"
 if (expr.getKind().equals(LOGICAL_COMPLEMENT)) {
  addFix(fix, ((JCUnary) expr).getExpression(), foundAssert, state, IS_FALSE);
  return;
 }
 // case: "assert expr1.equals(expr2)"
 if (instanceMethod().onClass(Any.INSTANCE).named("equals").matches(expr, state)) {
  JCMethodInvocation equalsCall = ((JCMethodInvocation) expr);
  JCExpression expr1 = ((JCFieldAccess) ((JCMethodInvocation) expr).meth).selected;
  JCExpression expr2 = equalsCall.getArguments().get(0);
  addFix(
    fix,
    expr1,
    foundAssert,
    state,
    String.format(IS_EQUAL_TO, normalizedSourceForExpression(expr2, state)));
  return;
 }
 // case: "assert expr1 == expr2" or "assert expr1 != expr2"
 if (expr.getKind().equals(Kind.EQUAL_TO) || expr.getKind().equals(Kind.NOT_EQUAL_TO)) {
  suggestFixForSameReference(fix, foundAssert, state, expr.getKind().equals(Kind.EQUAL_TO));
  return;
 }
 // case: "assert expr", which didn't match any of the previous cases.
 addFix(fix, (JCExpression) expr, foundAssert, state, IS_TRUE);
}
origin: google/error-prone

List<JCExpression> arguments = methodInvocation.getArguments();
Types types = state.getTypes();
if (arguments.size() != params.length()) {
origin: google/error-prone

@Override
public void printStat(JCTree tree) throws IOException {
 if (tree instanceof JCExpressionStatement
   && ((JCExpressionStatement) tree).getExpression() instanceof JCMethodInvocation) {
  JCMethodInvocation invocation =
    (JCMethodInvocation) ((JCExpressionStatement) tree).getExpression();
  JCExpression select = invocation.getMethodSelect();
  if (select != null && select.toString().equals("Refaster.emitComment")) {
   String commentLiteral =
     (String) ((JCLiteral) invocation.getArguments().get(0)).getValue();
   print("// " + commentLiteral);
   return;
  }
 }
 super.printStat(tree);
}
com.sun.tools.javac.treeJCTree$JCMethodInvocationgetArguments

Popular methods of JCTree$JCMethodInvocation

  • getMethodSelect
  • pos
  • setType
  • <init>
  • getTypeArguments
  • setPos
  • getStartPosition

Popular in Java

  • Parsing JSON documents to java classes using gson
  • startActivity (Activity)
  • getSharedPreferences (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Top plugins for WebStorm
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