Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSergey Prigogin2011-09-14 18:09:35 +0000
committerSergey Prigogin2011-09-14 19:36:50 +0000
commit1c153dcecedf947cc7efae1ec05486f6cefadb25 (patch)
tree06ad40ed49a31487862e0c256c906023530bf3ed
parent5ce8c116028fee3fe159fb1cf52a91f3ef5dc2cc (diff)
downloadorg.eclipse.cdt-1c153dcecedf947cc7efae1ec05486f6cefadb25.tar.gz
org.eclipse.cdt-1c153dcecedf947cc7efae1ec05486f6cefadb25.tar.xz
org.eclipse.cdt-1c153dcecedf947cc7efae1ec05486f6cefadb25.zip
Clarified Javadocs.
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java21
-rw-r--r--core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java19
2 files changed, 26 insertions, 14 deletions
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java
index 67906826647..11faa3f8b08 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/IASTIfStatement.java
@@ -6,18 +6,17 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * Doug Schaefer (IBM) - Initial API and implementation
+ * Doug Schaefer (IBM) - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast;
/**
- * The if statement including the optional else clause.
+ * The 'if' statement including the optional else clause.
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTIfStatement extends IASTStatement {
-
/**
* <code>CONDITION</code> represents the relationship between an
* <code>IASTIfStatement</code> and its nested <code>IASTExpression</code>.
@@ -40,14 +39,16 @@ public interface IASTIfStatement extends IASTStatement {
public static final ASTNodeProperty ELSE = new ASTNodeProperty("IASTIfStatement.ELSE - IASTStatement (else) for IASTIfStatement"); //$NON-NLS-1$
/**
- * Get the condition in the if statement.
+ * Returns the condition in the if statement.
*
- * @return the condition <code>IASTExpression</code>
+ * @return the condition <code>IASTExpression</code>. May return <code>null</code> if the 'if'
+ * statement has condition declaration instead of condition expression
+ * (see {@link org.eclipse.cdt.core.dom.ast.cpp.ICPPASTIfStatement}).
*/
public IASTExpression getConditionExpression();
/**
- * Set the condition in the if statement.
+ * Sets the condition in the if statement.
*
* @param condition
* <code>IASTExpression</code>
@@ -55,14 +56,14 @@ public interface IASTIfStatement extends IASTStatement {
public void setConditionExpression(IASTExpression condition);
/**
- * Get the statement that is executed if the condition is true.
+ * Returns the statement that is executed if the condition is true.
*
* @return the then clause <code>IASTStatement</code>
*/
public IASTStatement getThenClause();
/**
- * Set the statement that is executed if the condition is true.
+ * Sets the statement that is executed if the condition is true.
*
* @param thenClause
* <code>IASTStatement</code>
@@ -70,7 +71,7 @@ public interface IASTIfStatement extends IASTStatement {
public void setThenClause(IASTStatement thenClause);
/**
- * Get the statement that is executed if the condition is false. This clause
+ * Returns the statement that is executed if the condition is false. This clause
* is optional and returns null if there is none.
*
* @return the else clause or null <code>IASTStatement</code>
@@ -78,7 +79,7 @@ public interface IASTIfStatement extends IASTStatement {
public IASTStatement getElseClause();
/**
- * Set the else clause.
+ * Sets the else clause.
*
* @param elseClause
* <code>IASTStatement</code>
diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java
index 7beba63747a..b92519009d3 100644
--- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java
+++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/dom/ast/cpp/ICPPASTIfStatement.java
@@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
- * IBM - Initial API and implementation
+ * IBM - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp;
@@ -15,17 +15,28 @@ import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
import org.eclipse.cdt.core.dom.ast.IScope;
/**
+ * The 'if' statement including the optional else clause.
*
* @noextend This interface is not intended to be extended by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTIfStatement extends IASTIfStatement {
-
+ /**
+ * Returns the condition declaration. The condition declaration and the condition expression are
+ * mutually exclusive.
+ *
+ * @return the condition declaration, or <code>null</code> if the 'if' statement doesn't
+ * have a condition declaration.
+ */
public IASTDeclaration getConditionDeclaration();
- public void setConditionDeclaration( IASTDeclaration d );
+
+ /**
+ * Sets the condition declaration.
+ */
+ public void setConditionDeclaration(IASTDeclaration d);
/**
- * Get the implicit <code>IScope</code> represented by this if statement
+ * Returns the implicit <code>IScope</code> represented by this if statement
*
* @return <code>IScope</code>
*/

Back to the top