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

How to use
Select
in
lombok.ast

Best Java code snippets using lombok.ast.Select (Showing top 20 results out of 315)

origin: com.android.tools.external.lombok/lombok-ast

@Override public void visitFieldReference(FieldReference node) {
  lombok.ast.Select select = new lombok.ast.Select();
  select.astIdentifier(toIdentifier(node.token, node.nameSourcePosition));
  select.astOperand((lombok.ast.Expression) toTree(node.receiver));
  
  set(node, setPosition(node, select));
}

origin: me.tatarka.retrolambda.projectlombok/lombok.ast

@Override
public boolean visitSelect(Select node) {
  int start = posOfStructure(node.astIdentifier(), ".", true);
  int end = node.getPosition().getEnd();
  return set(node, setPos(start, end,
      treeMaker.Select(toExpression(node.astOperand()), toName(node.astIdentifier()))));
}

origin: com.android.tools.external.lombok/lombok-ast

  lombok.ast.Select current = node;
  while (true) {
    selects.add(current.astIdentifier());
    pos.add(pos(current.astIdentifier()));
    if (current.astOperand() instanceof lombok.ast.Select) current = (lombok.ast.Select) current.astOperand();
    else if (current.astOperand() instanceof lombok.ast.VariableReference) {
      selects.add(((lombok.ast.VariableReference) current.astOperand()).astIdentifier());
      pos.add(pos(current.rawOperand()));
      Collections.reverse(selects);
      long[] posArray = new long[pos.size()];
FieldReference ref = new FieldReference(toName(node.astIdentifier()), pos(node));
ref.nameSourcePosition = pos(node.astIdentifier());
ref.receiver = toExpression(node.astOperand());
origin: com.amazon.device.tools.lint/lint-checks

private boolean handleSelect(Select select) {
  if (select.toString().startsWith(R_DRAWABLE_PREFIX)) {
    String name = select.astIdentifier().astValue();
    if (mNotificationIcons == null) {
      mNotificationIcons = Sets.newHashSet();
    }
    mNotificationIcons.add(name);
    return true;
  }
  return false;
}
origin: com.amazon.device.tools.lint/lint-checks

  @Override
  public boolean visitSelect(Select node) {
    // R.type.name
    if (node.astOperand() instanceof Select) {
      Select select = (Select) node.astOperand();
      if (select.astOperand() instanceof VariableReference) {
        VariableReference reference = (VariableReference) select.astOperand();
        if (reference.astIdentifier().astValue().equals(R_CLASS)) {
          String type = select.astIdentifier().astValue();
          if (type.equals(MENU_TYPE)) {
            String name = node.astIdentifier().astValue();
            // Reclassify icons in the given menu as action bar icons
            if (mMenuToIcons != null) {
              Collection<String> icons = mMenuToIcons.get(name);
              if (icons != null) {
                if (mActionBarIcons == null) {
                  mActionBarIcons = Sets.newHashSet();
                }
                mActionBarIcons.addAll(icons);
              }
            }
          }
        }
      }
    }
    return super.visitSelect(node);
  }
}
origin: com.amazon.device.tools.lint/lint-checks

@Override
public boolean visitSelect(Select node) {
  if (node.astIdentifier().astValue().equals("layout") //$NON-NLS-1$
      && node.astOperand() instanceof VariableReference
      && ((VariableReference) node.astOperand()).astIdentifier().astValue()
        .equals("R")                             //$NON-NLS-1$
      && node.getParent() instanceof Select) {
    String layout = ((Select) node.getParent()).astIdentifier().astValue();
    registerLayoutActivity(layout, mClassFqn);
  }
  return false;
}
origin: me.tatarka.retrolambda.projectlombok/lombok.ast

set(node, new Select().astIdentifier(id).rawOperand(toTree(node.getExpression())));
origin: com.android.tools.external.lombok/lombok-ast

public Node createSelectOperation(Node identifier) {
  return posify(new Select().astIdentifier(createIdentifierIfNeeded(identifier, currentPos())));
}

origin: com.android.tools.external.lombok/lombok-ast

@Override
public boolean visitSelect(Select node) {
  parensOpen(node);
  formatter.buildInline(node);
  if (node.rawOperand() != null) {
    formatter.nameNextElement("operand");
    visit(node.rawOperand());
    formatter.append(".");
  }
  formatter.nameNextElement("selected");
  visit(node.astIdentifier());
  formatter.closeInline();
  parensClose(node);
  return true;
}

origin: com.amazon.device.tools.lint/lint-checks

  @Override
  public boolean visitMethodInvocation(MethodInvocation node) {
    if (node.astName().astValue().equals(SET_THEME)) {
      // Look at argument
      StrictListAccessor<Expression, MethodInvocation> args = node.astArguments();
      if (args.size() == 1) {
        Expression arg = args.first();
        if (arg instanceof Select) {
          String resource = arg.toString();
          if (resource.startsWith(R_STYLE_PREFIX)) {
            if (mActivityToTheme == null) {
              mActivityToTheme = new HashMap<String, String>();
            }
            String name = ((Select) arg).astIdentifier().astValue();
            mActivityToTheme.put(mClassFqn, STYLE_RESOURCE_PREFIX + name);
          }
        }
      }
    }
    return false;
  }
}
origin: com.amazon.device.tools.lint/lint-checks

  !(GRAVITY_CLASS.equals(((Select) parent).astOperand().toString()))) {
return false;
origin: me.tatarka.retrolambda.projectlombok/lombok.ast

public Node createLevel1Expression(org.parboiled.Node<Node> operand, List<org.parboiled.Node<Node>> operations) {
  Node current = operand.getValue();
  if (operations == null) return current;
  
  for (org.parboiled.Node<Node> pNode : operations) {
    Node o = pNode.getValue();
    
    if (o instanceof ArrayAccess) {
      current = ((ArrayAccess)o).rawOperand(current);
    } else if (o instanceof MethodInvocation) {
      current = ((MethodInvocation)o).rawOperand(current);
    } else if (o instanceof Select) {
      current = ((Select)o).rawOperand(current);
    } else {
      DanglingNodes.addDanglingNode(current, o);
    }
    
    positionSpan(o, operand, pNode);
  }
  return current;
}

origin: me.tatarka.retrolambda.projectlombok/lombok.ast

  private List<String> unwrapSelectChain(Select s) {
    List<String> list = Lists.newArrayList();
    while (s != null) {
      list.add(s.astIdentifier().astValue());
      Expression parent = s.astOperand();
      if (parent instanceof Select) {
        s = (Select) parent;
      } else if (parent instanceof Identifier) {
        s = null;
        list.add(((Identifier)parent).astValue());
      } else if (parent == null) {
        break;
      } else {
        throw new ResolutionException(parent, "Identifies expected here, not a " + parent.getClass().getSimpleName());
      }
    }
    
    Collections.reverse(list);
    return list;
  }
}
origin: com.android.tools.lint/lint-api

if (mVisitResources) {
  if (node.astOperand() instanceof Select) {
    Select select = (Select) node.astOperand();
    if (select.astOperand() instanceof VariableReference) {
      VariableReference reference = (VariableReference) select.astOperand();
      if (reference.astIdentifier().astValue().equals(R_CLASS)) {
        String type = select.astIdentifier().astValue();
        String name = node.astIdentifier().astValue();
  if (node.astIdentifier().astValue().equals(R_CLASS)) {
    Node parent = node.getParent();
    if (parent instanceof Select) {
      Node grandParent = parent.getParent();
      if (grandParent instanceof Select) {
        Select select = (Select) grandParent;
        String name = select.astIdentifier().astValue();
        Expression typeOperand = select.astOperand();
        if (typeOperand instanceof Select) {
          Select typeSelect = (Select) typeOperand;
          String type = typeSelect.astIdentifier().astValue();
          boolean isFramework = node.astOperand().toString().equals(
              ANDROID_PKG);
          for (VisitingDetector v : mResourceFieldDetectors) {
origin: com.android.tools.external.lombok/lombok-ast

set(node, new Select().astIdentifier(id).rawOperand(toTree(node.getExpression())));
origin: org.projectlombok/lombok.ast

public Node createSelectOperation(Node identifier) {
  return posify(new Select().astIdentifier(createIdentifierIfNeeded(identifier, currentPos())));
}

origin: me.tatarka.retrolambda.projectlombok/lombok.ast

@Override
public boolean visitSelect(Select node) {
  parensOpen(node);
  formatter.buildInline(node);
  if (node.rawOperand() != null) {
    formatter.nameNextElement("operand");
    visit(node.rawOperand());
    formatter.append(".");
  }
  formatter.nameNextElement("selected");
  visit(node.astIdentifier());
  formatter.closeInline();
  parensClose(node);
  return true;
}

origin: com.amazon.device.tools.lint/lint-checks

levelString = ((Select)isLoggableLevel).astIdentifier().astValue();
origin: org.projectlombok/lombok.ast

private void updateRestrictionFlags(lombok.ast.Node node, NameReference ref) {
  ref.bits &= ~ASTNode.RestrictiveFlagMASK;
  ref.bits |= Binding.VARIABLE;
  
  if (node.getParent() instanceof lombok.ast.MethodInvocation) {
    if (((lombok.ast.MethodInvocation)node.getParent()).astOperand() == node) {
      ref.bits |= Binding.TYPE;
    }
  }
  
  if (node.getParent() instanceof lombok.ast.Select) {
    if (((lombok.ast.Select)node.getParent()).astOperand() == node) {
      ref.bits |= Binding.TYPE;
    }
  }
}

origin: org.projectlombok/lombok.ast

public Node createLevel1Expression(org.parboiled.Node<Node> operand, List<org.parboiled.Node<Node>> operations) {
  Node current = operand.getValue();
  if (operations == null) return current;
  
  for (org.parboiled.Node<Node> pNode : operations) {
    Node o = pNode.getValue();
    
    if (o instanceof ArrayAccess) {
      current = ((ArrayAccess)o).rawOperand(current);
    } else if (o instanceof MethodInvocation) {
      current = ((MethodInvocation)o).rawOperand(current);
    } else if (o instanceof Select) {
      current = ((Select)o).rawOperand(current);
    } else {
      DanglingNodes.addDanglingNode(current, o);
    }
    
    positionSpan(o, operand, pNode);
  }
  return current;
}

lombok.astSelect

Most used methods

  • astIdentifier
  • astOperand
  • <init>
  • getPosition
  • rawOperand
  • getParent
  • toString

Popular in Java

  • Finding current android device location
  • getResourceAsStream (ClassLoader)
  • onRequestPermissionsResult (Fragment)
  • getContentResolver (Context)
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JComboBox (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top Sublime Text 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