1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 22:52:11 +02:00

Add JavaDoc.

This commit is contained in:
John Camelon 2005-03-11 02:15:20 +00:00
parent 5410741fac
commit 5f933cf7ff
11 changed files with 110 additions and 14 deletions

View file

@ -22,10 +22,15 @@ public interface IASTGotoStatement extends IASTStatement {
/**
* Returns the name of the label. The name resolves to a ILabel binding.
*
* @return
* @return <code>IASTName</code>
*/
public IASTName getName();
/**
* Set the name for a goto statement label.
*
* @param name <code>IASTName</code>
*/
public void setName(IASTName name);
}

View file

@ -17,6 +17,9 @@ package org.eclipse.cdt.core.dom.ast;
*/
public interface IASTIdExpression extends IASTExpression {
/**
* <code>ID_NAME</code> represents the relationship between an <code>IASTIdExpression</code> and a <code>IASTName</code>.
*/
public static final ASTNodeProperty ID_NAME = new ASTNodeProperty( "IdExpression Name"); //$NON-NLS-1$
/**
* Returns the name used in the expression.
@ -25,5 +28,10 @@ public interface IASTIdExpression extends IASTExpression {
*/
public IASTName getName();
/**
* Set the name to be used inthe expression.
*
* @param name
*/
public void setName( IASTName name );
}

View file

@ -17,36 +17,59 @@ package org.eclipse.cdt.core.dom.ast;
*/
public interface IASTIfStatement extends IASTStatement {
/**
* <code>CONDITION</code> represents the relationship between an <code>IASTIfStatement</code> and its nested <code>IASTExpression</code>.
*/
public static final ASTNodeProperty CONDITION = new ASTNodeProperty("condition"); //$NON-NLS-1$
/**
* <code>THEN</code> represents the relationship between an <code>IASTIfStatement</code> and its nested <code>IASTStatement</code> (then).
*/
public static final ASTNodeProperty THEN = new ASTNodeProperty("then"); //$NON-NLS-1$
/**
* <code>ELSE</code> represents the relationship between an <code>IASTIfStatement</code> and its nested <code>IASTStatement</code> (else).
*/
public static final ASTNodeProperty ELSE = new ASTNodeProperty("else"); //$NON-NLS-1$
/**
* The condition in the if statement.
* Get the condition in the if statement.
*
* @return the condition expression
* @return the condition <code>IASTExpression</code>
*/
public IASTExpression getCondition();
/**
* Set the condition in the if statement.
* @param condition <code>IASTExpression</code>
*/
public void setCondition(IASTExpression condition);
/**
* The statement that is executed if the condition is true.
* Get the statement that is executed if the condition is true.
*
* @return the then clause
* @return the then clause <code>IASTStatement</code>
*/
public IASTStatement getThenClause();
/**
* Set the statement that is executed if the condition is true.
*
* @param thenClause <code>IASTStatement</code>
*/
public void setThenClause(IASTStatement thenClause);
/**
* The statement that is executed if the condition is false. This
* Get 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
* @return the else clause or null <code>IASTStatement</code>
*/
public IASTStatement getElseClause();
/**
* Set the else clause.
*
* @param elseClause <code>IASTStatement</code>
*/
public void setElseClause(IASTStatement elseClause);
}

View file

@ -16,6 +16,10 @@ package org.eclipse.cdt.core.dom.ast;
* @author Doug Schaefer
*/
public interface IASTInitializer extends IASTNode {
public final static IASTInitializer[] EMPTY_INIALIZER_ARRAY = new IASTInitializer[0];
/**
* Constant.
*/
public final static IASTInitializer[] EMPTY_INITIALIZER_ARRAY = new IASTInitializer[0];
}

View file

@ -17,13 +17,21 @@ package org.eclipse.cdt.core.dom.ast;
*/
public interface IASTInitializerExpression extends IASTInitializer {
public ASTNodeProperty INITIALIZER_EXPRESSION = new ASTNodeProperty( "Initializer Expression"); //$NON-NLS-1$
/**
* <code>INITIALIZER_EXPRESSION</code> represents the relationship between an <code>IASTInitializerExpression</code>. and its <code></code>IASTExpression</code>.
*/
public static final ASTNodeProperty INITIALIZER_EXPRESSION = new ASTNodeProperty( "Initializer Expression"); //$NON-NLS-1$
/**
* Get the expression for the initializer.
*
* @return
* @return <code>IASTExpression</code>
*/
public IASTExpression getExpression();
/**
* Set the initializer's expression.
*
* @param expression <code>IASTExpression</code>
*/
public void setExpression( IASTExpression expression );
}

View file

@ -18,13 +18,22 @@ package org.eclipse.cdt.core.dom.ast;
*/
public interface IASTInitializerList extends IASTInitializer {
public ASTNodeProperty NESTED_INITIALIZER = new ASTNodeProperty( "Nested Initializer" ); //$NON-NLS-1$
/**
* <code>NESTED_INITIALIZER</code> describes the relationship between an <code>IASTInitializerList</code> and its sub-<code>IASTInitializer</code>s.
*/
public static final ASTNodeProperty NESTED_INITIALIZER = new ASTNodeProperty( "Nested Initializer" ); //$NON-NLS-1$
/**
* Get the list of initializers.
*
* @return
* @return <code>IASTInitializer[]</code> array of initializers
*/
public IASTInitializer[] getInitializers();
/**
* Add an initializer to the initializer list.
*
* @param initializer <code>IASTInitializer</code>
*/
public void addInitializer( IASTInitializer initializer );
}

View file

@ -26,6 +26,11 @@ public interface IASTLabelStatement extends IASTStatement {
*/
public IASTName getName();
/**
* Set the name for a label.
*
* @param name
*/
public void setName(IASTName name);
}

View file

@ -17,15 +17,45 @@ package org.eclipse.cdt.core.dom.ast;
*/
public interface IASTLiteralExpression extends IASTExpression {
/**
* An integer literal e.g. 5
*/
public static final int lk_integer_constant = 0;
/**
* A floating point literal e.g. 6.0
*/
public static final int lk_float_constant = 1;
/**
* A char literal e.g. 'abc'
*/
public static final int lk_char_constant = 2;
/**
* A string literal e.g. "abcdefg"
*/
public static final int lk_string_literal = 3;
/**
* A constant defined for subclasses to extend from.
*/
public static final int lk_last = lk_string_literal;
/**
* Get the literal expression kind.
*
* @return int
*/
public int getKind();
/**
* Set the literal expression kind.
*
* @param value int
*/
public void setKind( int value );
/**
* Set the value of the literal expression.
*
* @param value
*/
public void setValue( String value );
}

View file

@ -11,6 +11,10 @@
package org.eclipse.cdt.core.dom.ast;
/**
* A Macro expansion is a node location.
* Nodes that have locations that arrive through the expansion of preprocessor macros
* will refer to these type of objects.
*
* @author Doug Schaefer
*/
public interface IASTMacroExpansion extends IASTNodeLocation {

View file

@ -26,7 +26,7 @@ public class CASTInitializerList extends CASTNode implements
* @see org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration#getDeclarators()
*/
public IASTInitializer[] getInitializers() {
if( initializers == null ) return IASTInitializer.EMPTY_INIALIZER_ARRAY;
if( initializers == null ) return IASTInitializer.EMPTY_INITIALIZER_ARRAY;
removeNullInitializers();
return initializers;
}

View file

@ -26,7 +26,7 @@ public class CPPASTInitializerList extends CPPASTNode implements
* @see org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration#getDeclarators()
*/
public IASTInitializer [] getInitializers() {
if( initializers == null ) return IASTInitializer.EMPTY_INIALIZER_ARRAY;
if( initializers == null ) return IASTInitializer.EMPTY_INITIALIZER_ARRAY;
removeNullInitializers();
return initializers;
}