Package lombok.ast

Examples of lombok.ast.VariableDefinitionEntry.astArrayDimensions()


    def.astVarargs((first.mods.flags & Flags.VARARGS) != 0);
   
    for (JCVariableDecl varDecl : decls) {
      int extraDims = countDims(varDecl.vartype) - baseDims;
      VariableDefinitionEntry entry = new VariableDefinitionEntry();
      entry.astArrayDimensions(extraDims);
      entry.astName(setPos(varDecl, new Identifier().astValue(varDecl.name.toString())));
      entry.rawInitializer(toTree(varDecl.init));
      setPos(varDecl, entry);
      if (extraDims > 0) {
        JCArrayTypeTree arrayType = (JCArrayTypeTree) varDecl.vartype;
View Full Code Here


   */
  private void simplifyArrayDecls(Node node) {
    node.accept(new ForwardingAstVisitor() {
      @Override public boolean visitVariableDefinition(VariableDefinition node) {
        VariableDefinitionEntry varDefEntry = node.astVariables().first();
        int arrayDimensions = varDefEntry.astArrayDimensions();
        if (arrayDimensions == 0) {
          return true;
        }
        varDefEntry.astArrayDimensions(0);
        TypeReference typeRef = node.astTypeReference();
View Full Code Here

        VariableDefinitionEntry varDefEntry = node.astVariables().first();
        int arrayDimensions = varDefEntry.astArrayDimensions();
        if (arrayDimensions == 0) {
          return true;
        }
        varDefEntry.astArrayDimensions(0);
        TypeReference typeRef = node.astTypeReference();
        typeRef.astArrayDimensions(typeRef.astArrayDimensions() + arrayDimensions);
        return true;
      }
    });
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.