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

net.sourceforge.pmd.lang.java.ast.ASTLoopStatement 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.Nullable;

/**
 * A loop statement.
 *
 * 
 *
 * Statement ::= {@link ASTDoStatement DoStatement}
 *             | {@link ASTForeachStatement ForeachStatement}
 *             | {@link ASTForStatement ForStatement}
 *             | {@link ASTWhileStatement WhileStatement}
 *
 * 
* * */ public interface ASTLoopStatement extends ASTStatement { /** Returns the statement that represents the body of this loop. */ default ASTStatement getBody() { return (ASTStatement) getLastChild(); } /** * Returns the node that represents the condition of this loop. * This may be any expression of type boolean. * *

If there is no specified guard, then returns null (in particular, * returns null if this is a foreach loop). */ default @Nullable ASTExpression getCondition() { return null; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy