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

net.sourceforge.pmd.lang.java.ast.ASTArrayAccess 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 org.checkerframework.checker.nullness.qual.NonNull;

/**
 * An array access expression.
 *
 * 
 *
 * ArrayAccess ::=  {@link ASTExpression Expression} "["  {@link ASTExpression Expression} "]"
 *
 * 
*/ public final class ASTArrayAccess extends AbstractJavaExpr implements ASTAssignableExpr, QualifiableExpression { ASTArrayAccess(int id) { super(id); } /** * Returns the expression to the left of the "[". * This can never be a {@linkplain ASTTypeExpression type}, * and is never {@linkplain ASTAmbiguousName ambiguous}. */ @NonNull @Override public ASTExpression getQualifier() { return (ASTExpression) getChild(0); } /** Returns the expression within the brackets. */ public ASTExpression getIndexExpression() { return (ASTExpression) getChild(1); } @Override protected R acceptVisitor(JavaVisitor visitor, P data) { return visitor.visit(this, data); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy