mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-29 11:55:40 +02:00
Add more javadoc.
This commit is contained in:
parent
a656f70b4d
commit
e4d3a83c55
6 changed files with 172 additions and 21 deletions
|
@ -18,7 +18,11 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
*/
|
||||
public interface IASTFieldDeclarator extends IASTDeclarator {
|
||||
|
||||
ASTNodeProperty FIELD_SIZE = new ASTNodeProperty( "BitField Size"); //$NON-NLS-1$
|
||||
/**
|
||||
* <code>FIELD_SIZE</code> represents the relationship between a <code>IASTFieldDeclarator</code> and its <code>IASTExpression</code>.
|
||||
*/
|
||||
public static final ASTNodeProperty FIELD_SIZE = new ASTNodeProperty( "BitField Size"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* This returns the number of bits if this is a bit field.
|
||||
* If it is not a bit field, it returns null.
|
||||
|
@ -27,6 +31,10 @@ public interface IASTFieldDeclarator extends IASTDeclarator {
|
|||
*/
|
||||
public IASTExpression getBitFieldSize();
|
||||
|
||||
/**
|
||||
* Set the bitfield size.
|
||||
* @param size <code>IASTExpression</code>
|
||||
*/
|
||||
public void setBitFieldSize( IASTExpression size );
|
||||
|
||||
}
|
||||
|
|
|
@ -11,11 +11,21 @@
|
|||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
/**
|
||||
* This interface represents expressions that access a field reference.
|
||||
* e.g. a.b => a is the expression, b is the field name.
|
||||
* e.g. a()->def => a() is the expression, def is the field name.
|
||||
*
|
||||
* @author Doug Schaefer
|
||||
*/
|
||||
public interface IASTFieldReference extends IASTExpression {
|
||||
|
||||
/**
|
||||
* <code>FIELD_OWNER</code> represents the relationship between a <code>IASTFieldReference</code> and its <code>IASTExpression</code> field owner.
|
||||
*/
|
||||
public static final ASTNodeProperty FIELD_OWNER = new ASTNodeProperty( "Field Owner"); //$NON-NLS-1$
|
||||
/**
|
||||
* <code>FIELD_NAME</code> represents the relationship between a <code>IASTFieldReference</code> and its <code>IASTName</code> field name.
|
||||
*/
|
||||
public static final ASTNodeProperty FIELD_NAME = new ASTNodeProperty( "Field Name"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
|
@ -25,15 +35,25 @@ public interface IASTFieldReference extends IASTExpression {
|
|||
*/
|
||||
public IASTExpression getFieldOwner();
|
||||
|
||||
/**
|
||||
* Set the expression for the object containing the field.
|
||||
*
|
||||
* @param expression
|
||||
*/
|
||||
public void setFieldOwner( IASTExpression expression );
|
||||
|
||||
/**
|
||||
* This returns the name of the field being dereferenced.
|
||||
*
|
||||
* @return the name of the field
|
||||
* @return the name of the field (<code>IASTName</code>)
|
||||
*/
|
||||
public IASTName getFieldName();
|
||||
|
||||
/**
|
||||
* Set the name of the field.
|
||||
*
|
||||
* @param name <code>IASTName</code>
|
||||
*/
|
||||
public void setFieldName( IASTName name );
|
||||
|
||||
/**
|
||||
|
@ -44,6 +64,10 @@ public interface IASTFieldReference extends IASTExpression {
|
|||
*/
|
||||
public boolean isPointerDereference();
|
||||
|
||||
/**
|
||||
* Set whether or not this is a pointer dereference (default == no).
|
||||
* @param value boolean
|
||||
*/
|
||||
public void setIsPointerDereference( boolean value );
|
||||
|
||||
}
|
||||
|
|
|
@ -18,54 +18,103 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
*/
|
||||
public interface IASTForStatement extends IASTStatement {
|
||||
|
||||
/**
|
||||
* <code>INITEXPRESSION</code> represents the relationship between a <code>IASTForStatement</code> and its <code>IASTExpression</code> initializer.
|
||||
*/
|
||||
public static final ASTNodeProperty INITEXPRESSION = new ASTNodeProperty("initExpression"); //$NON-NLS-1$
|
||||
/**
|
||||
* <code>INITDECLARATION</code> represents the relationship between a <code>IASTForStatement</code> and its <code>IASTDeclaration</code> initializer.
|
||||
*/
|
||||
public static final ASTNodeProperty INITDECLARATION = new ASTNodeProperty("initDeclaration"); //$NON-NLS-1$
|
||||
/**
|
||||
* <code>CONDITION</code> represents the relationship between a <code>IASTForStatement</code> and its <code>IASTExpression</code> condition.
|
||||
*/
|
||||
public static final ASTNodeProperty CONDITION = new ASTNodeProperty("condition"); //$NON-NLS-1$
|
||||
/**
|
||||
* <code>ITERATION</code> represents the relationship between a <code>IASTForStatement</code> and its <code>IASTExpression</code> iteration expression.
|
||||
*/
|
||||
public static final ASTNodeProperty ITERATION = new ASTNodeProperty("iteration"); //$NON-NLS-1$
|
||||
/**
|
||||
* <code>BODY</code> represents the relationship between a <code>IASTForStatement</code> and its <code>IASTStatement</code> body.
|
||||
*/
|
||||
public static final ASTNodeProperty BODY = new ASTNodeProperty("body"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* The initial expression for the loop. Returns null if there is
|
||||
* Get the initial expression for the loop. Returns null if there is
|
||||
* none. You can not have both an initial expression and an initial
|
||||
* declaration.
|
||||
*
|
||||
* @return
|
||||
* @return <code>IASTExpression</code>
|
||||
*/
|
||||
public IASTExpression getInitExpression();
|
||||
|
||||
/**
|
||||
* Set the initial expression for the loop.
|
||||
*
|
||||
* @param expression <code>IASTExpression</code>
|
||||
*/
|
||||
public void setInit(IASTExpression expression);
|
||||
|
||||
/**
|
||||
* The initial declaration for the loop. Returns null if there is
|
||||
* Get the initial declaration for the loop. Returns null if there is
|
||||
* none. You can not have both an initial declaration and an initial
|
||||
* declaration.
|
||||
*
|
||||
* @return
|
||||
* @return <code>IASTDeclaration</code>
|
||||
*/
|
||||
public IASTDeclaration getInitDeclaration();
|
||||
/**
|
||||
* Set the intiial declaration for the loop.
|
||||
*
|
||||
* @param declaration <code>IASTDeclaration</code>
|
||||
*/
|
||||
public void setInit(IASTDeclaration declaration);
|
||||
|
||||
/**
|
||||
* The condition for the loop.
|
||||
* Get the condition expression for the loop.
|
||||
*
|
||||
* @return
|
||||
* @return <code>IASTExpression</code>
|
||||
*/
|
||||
public IASTExpression getCondition();
|
||||
|
||||
/**
|
||||
* Set the condition expression for the loop.
|
||||
*
|
||||
* @param condition <code>IASTExpression</code>
|
||||
*/
|
||||
public void setCondition(IASTExpression condition);
|
||||
|
||||
/**
|
||||
* The expression that is evaluated after the completion of an iteration
|
||||
* Get the expression that is evaluated after the completion of an iteration
|
||||
* of the loop.
|
||||
*
|
||||
* @return
|
||||
* @return <code>IASTExpression</code>
|
||||
*/
|
||||
public IASTExpression getIterationExpression();
|
||||
|
||||
/**
|
||||
* Set the expression that is evaluated after the completion of an iteration of the loop.
|
||||
*
|
||||
* @param iterator <code>IASTExpression</code>
|
||||
*/
|
||||
public void setIterationExpression(IASTExpression iterator);
|
||||
|
||||
/**
|
||||
* Get the statements that this for loop controls.
|
||||
*
|
||||
* @return <code>IASTStatement</code>
|
||||
*/
|
||||
public IASTStatement getBody();
|
||||
/**
|
||||
* Set the body of the for loop.
|
||||
*
|
||||
* @param statement <code>IASTStatement</code>
|
||||
*/
|
||||
public void setBody( IASTStatement statement );
|
||||
|
||||
/**
|
||||
* Get the <code>IScope</code> represented by this for loop.
|
||||
* @return <code>IScope</code>
|
||||
*/
|
||||
public IScope getScope();
|
||||
}
|
||||
|
|
|
@ -10,16 +10,42 @@
|
|||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
/**
|
||||
* This interface represents a function call expression.
|
||||
* f( x ) : f is the function name expression, x is the parameter expression.
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface IASTFunctionCallExpression extends IASTExpression {
|
||||
|
||||
|
||||
/**
|
||||
* <code>FUNCTION_NAME</code> represents the relationship between a <code>IASTFunctionCallExpression</code> and its <code>IASTExpression</code> (function name).
|
||||
*/
|
||||
public static final ASTNodeProperty FUNCTION_NAME = new ASTNodeProperty( "Function Name"); //$NON-NLS-1$
|
||||
/**
|
||||
* Set the function name expression.
|
||||
* @param expression <code>IASTExpression</code> representing the function name
|
||||
*/
|
||||
public void setFunctionNameExpression( IASTExpression expression );
|
||||
/**
|
||||
* Get the function name expression.
|
||||
* @return <code>IASTExpression</code> representing the function name
|
||||
*/
|
||||
public IASTExpression getFunctionNameExpression();
|
||||
|
||||
/**
|
||||
* <code>PARAMETERS</code> represents the relationship between a <code>IASTFunctionCallExpression</code> and its <code>IASTExpression</code> (parameters).
|
||||
*/
|
||||
public static final ASTNodeProperty PARAMETERS = new ASTNodeProperty( "Parameters"); //$NON-NLS-1$
|
||||
/**
|
||||
* Set the parameters expression.
|
||||
* @param expression <code>IASTExpression</code> representing the parameters
|
||||
*/
|
||||
public void setParameterExpression( IASTExpression expression );
|
||||
/**
|
||||
* Get the parameter expression.
|
||||
* @return <code>IASTExpression</code> representing the parameters
|
||||
*/
|
||||
public IASTExpression getParameterExpression();
|
||||
|
||||
}
|
||||
|
|
|
@ -17,38 +17,65 @@ package org.eclipse.cdt.core.dom.ast;
|
|||
*/
|
||||
public interface IASTFunctionDefinition extends IASTDeclaration {
|
||||
|
||||
ASTNodeProperty DECL_SPECIFIER = new ASTNodeProperty( "Decl Specifier"); //$NON-NLS-1$
|
||||
ASTNodeProperty DECLARATOR = new ASTNodeProperty( "Declarator"); //$NON-NLS-1$
|
||||
ASTNodeProperty FUNCTION_BODY = new ASTNodeProperty( "Function Body"); //$NON-NLS-1$
|
||||
/**
|
||||
* <code>DECL_SPECIFIER</code> represents the relationship between a <code>IASTFunctionDefinition</code> and its <code>IASTDeclSpecifier</code>.
|
||||
*/
|
||||
public static final ASTNodeProperty DECL_SPECIFIER = new ASTNodeProperty( "Decl Specifier"); //$NON-NLS-1$
|
||||
/**
|
||||
* <code>DECLARATOR</code> represents the relationship between a <code>IASTFunctionDefinition</code> and its <code>IASTFunctionDeclarator</code>.
|
||||
*/
|
||||
public static final ASTNodeProperty DECLARATOR = new ASTNodeProperty( "Declarator"); //$NON-NLS-1$
|
||||
/**
|
||||
* <code>FUNCTION_BODY</code> represents the relationship between a <code>IASTFunctionDefinition</code> and its <code>IASTStatement</code>.
|
||||
*/
|
||||
public static final ASTNodeProperty FUNCTION_BODY = new ASTNodeProperty( "Function Body"); //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* The decl specifier for the function.
|
||||
* Get the decl specifier for the function.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public IASTDeclSpecifier getDeclSpecifier();
|
||||
|
||||
/**
|
||||
* Set the decl specifier for the function.
|
||||
*
|
||||
* @param declSpec
|
||||
*/
|
||||
public void setDeclSpecifier( IASTDeclSpecifier declSpec );
|
||||
|
||||
/**
|
||||
* The declarator for the function.
|
||||
* Get the declarator for the function.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public IASTFunctionDeclarator getDeclarator();
|
||||
|
||||
/**
|
||||
* Set the declarator for the function.
|
||||
*
|
||||
* @param declarator
|
||||
*/
|
||||
public void setDeclarator( IASTFunctionDeclarator declarator );
|
||||
|
||||
/**
|
||||
* This is the body of the function. This is usually a compound statement
|
||||
* Get the body of the function. This is usually a compound statement
|
||||
* but C++ also has a function try block.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public IASTStatement getBody();
|
||||
|
||||
/**
|
||||
* Set the body of the function.
|
||||
* @param statement
|
||||
*/
|
||||
public void setBody( IASTStatement statement );
|
||||
|
||||
/**
|
||||
* Get the logical IScope that the function definition body represents.
|
||||
* @return <code>IScope</code> representing function body.
|
||||
*/
|
||||
public IScope getScope();
|
||||
|
||||
}
|
||||
|
|
|
@ -11,13 +11,30 @@
|
|||
package org.eclipse.cdt.core.dom.ast;
|
||||
|
||||
/**
|
||||
* This interface represents the name of a function style macro parameter.
|
||||
* This is not an IASTName, as there are not any bindings for
|
||||
*
|
||||
* @author jcamelon
|
||||
*/
|
||||
public interface IASTFunctionStyleMacroParameter extends IASTNode {
|
||||
|
||||
public static final IASTFunctionStyleMacroParameter[] EMPTY_PARAMETER_ARRAY = new IASTFunctionStyleMacroParameter[0];
|
||||
|
||||
public String getParameter();
|
||||
public void setParameter( String value );
|
||||
|
||||
/**
|
||||
* Constant <code>EMPTY_PARAMETER_ARRAY</code> is used to return anempty array.
|
||||
*/
|
||||
public static final IASTFunctionStyleMacroParameter[] EMPTY_PARAMETER_ARRAY = new IASTFunctionStyleMacroParameter[0];
|
||||
|
||||
/**
|
||||
* Get the parameter name.
|
||||
*
|
||||
* @return String name
|
||||
*/
|
||||
public String getParameter();
|
||||
|
||||
/**
|
||||
* Set the parameter name.
|
||||
*
|
||||
* @param value String
|
||||
*/
|
||||
public void setParameter(String value);
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue