All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sourceforge.pmd.lang.java.ast.ASTArrayDimensions Maven / Gradle / Ivy

There is a newer version: 7.7.0
Show newest version
/**
 * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
 */

package net.sourceforge.pmd.lang.java.ast;

import net.sourceforge.pmd.lang.java.ast.ASTList.ASTNonEmptyList;


/**
 * Represents array type dimensions. This node may occur in several contexts:
 * 
    *
  • In an {@linkplain ASTArrayType array type}
  • *
  • As the {@linkplain ASTMethodDeclaration#getExtraDimensions() extra dimensions of a method declaration}, * after the formal parameter list. For example: *
    public int newIntArray(int length) [];
    *
  • *
  • As the {@linkplain ASTVariableId#getExtraDimensions() extra dimensions of a variable declarator id}, * in a {@linkplain ASTVariableDeclarator variable declarator}. For example: *
    public int a[], b[][];
    *
  • *
* *

Some dimensions may be initialized with an expression, but only in * the array type of an {@linkplain ASTArrayAllocation array allocation expression}. * *

 *
 * ArrayDimensions ::= {@link ASTArrayTypeDim ArrayTypeDim}+ {@link ASTArrayDimExpr ArrayDimExpr}*
 *
 * 
*/ public final class ASTArrayDimensions extends ASTNonEmptyList { ASTArrayDimensions(int id) { super(id, ASTArrayTypeDim.class); } @Override protected R acceptVisitor(JavaVisitor visitor, P data) { return visitor.visit(this, data); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy