ASTLocalVariableDeclaration extends AbstractJavaAccessNode implements Dimensionable, CanSuppressWarnings, Iterable<ASTVariableDeclaratorId> { @Override @Deprecated public int getArrayDepth() { return getArrayDimensionOnType() + getArrayDimensionOnDeclaratorId(); } @InternalApi @Deprecated  ASTLocalVariableDeclaration(int id); @InternalApi @Deprecated  ASTLocalVariableDeclaration(JavaParser p, int id); @Override Object jjtAccept(JavaParserVisitor visitor, Object data); @Override boolean hasSuppressWarningsAnnotationFor(Rule rule); boolean isTypeInferred(); @Override @Deprecated boolean isArray(); @Override @Deprecated int getArrayDepth(); ASTType getTypeNode(); @Deprecated @DeprecatedAttribute(replaceWith = "VariableDeclaratorId/@Name") String getVariableName(); @Override Iterator<ASTVariableDeclaratorId> iterator();  }
@Test public void testSingleDimArray() { ASTLocalVariableDeclaration node = java.parse(TEST1).findDescendantsOfType(ASTLocalVariableDeclaration.class).get(0); assertEquals(1, node.getArrayDepth()); }
@Test public void testMultDimArray() { ASTLocalVariableDeclaration node = java.parse(TEST2).findDescendantsOfType(ASTLocalVariableDeclaration.class).get(0); assertEquals(2, node.getArrayDepth()); }
@Test public void testMultDimArraySplitBraces() { ASTLocalVariableDeclaration node = java.parse(TEST3).findDescendantsOfType(ASTLocalVariableDeclaration.class).get(0); assertEquals(3, node.getArrayDepth()); }