1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-23 06:32:10 +02:00

bug 258345, implementation of IASTNode.copy()

This commit is contained in:
Mike Kucera 2008-12-17 15:41:35 +00:00
parent de24d81d29
commit a036483c18
333 changed files with 4860 additions and 2192 deletions

View file

@ -0,0 +1,118 @@
package org.eclipse.cdt.core.parser.tests;
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import junit.framework.Assert;
import junit.framework.AssertionFailedError;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
public class ASTComparer extends Assert {
private static Set<String> methodsToIgnore = new HashSet<String>(Arrays.asList(
// prevent infinite recursion
"getParent",
"getTranslationUnit",
"getLastName",
// original is usually frozen but copy must not be
"isFrozen",
// these methods are problematic
"getChildren",
"getProblem",
"getContainingFilename",
// ignore preprocessor nodes
"getMacroDefinitions",
"getBuiltinMacroDefinitions",
"getIncludeDirectives",
"getAllPreprocessorStatements",
"getMacroExpansions",
"getPreprocessorProblems",
"getComments"
));
public static void assertCopy(IASTNode node1, IASTNode node2) {
try {
assertCopy(node1, node2, 0);
} catch(Exception e) {
throw new RuntimeException(e);
}
}
private static void assertCopy(IASTNode node1, IASTNode node2, int n) throws Exception {
if(node1 == null && node2 == null)
return;
assertNotNull(node1);
assertNotNull(node2);
assertFalse(node1 == node2); // must be distinct copy
Class klass1 = node1.getClass();
Class klass2 = node2.getClass();
assertTrue(klass1.equals(klass2)); // nodes must be the same concrete type
//System.out.println(spaces(n) + klass1.getSimpleName());
BeanInfo beanInfo = Introspector.getBeanInfo(klass1);
for(PropertyDescriptor property : beanInfo.getPropertyDescriptors()) {
Method getter = property.getReadMethod();
if(getter == null)
continue;
if(methodsToIgnore.contains(getter.getName()))
continue;
try {
Class returnType = getter.getReturnType();
if(IASTNode.class.isAssignableFrom(returnType)) {
//System.out.println(spaces(n) + "Testing1: " + getter.getName());
IASTNode result1 = (IASTNode) getter.invoke(node1);
IASTNode result2 = (IASTNode) getter.invoke(node2);
assertCopy(result1, result2, n+1); // members must be same
}
else if(returnType.isArray() && IASTNode.class.isAssignableFrom(returnType.getComponentType())) {
//System.out.println(spaces(n) + "Testing2: " + getter.getName());
IASTNode[] result1 = (IASTNode[]) getter.invoke(node1);
IASTNode[] result2 = (IASTNode[]) getter.invoke(node2);
if(result1 == null && result2 == null)
continue;
assertNotNull(result1);
assertNotNull(result2);
assertEquals(result1.length, result2.length);
for(int i = 0; i < result1.length; i++)
assertCopy(result1[i], result2[i], n+1);
}
else if((returnType.isPrimitive() || returnType.equals(String.class)) && !returnType.equals(Void.class)) {
//System.out.println(spaces(n) + "Testing3: " + getter.getName());
Object result1 = getter.invoke(node1);
Object result2 = getter.invoke(node2);
assertEquals(result1, result2);
}
} catch(AssertionFailedError e) {
System.out.printf("Failure when calling %s.%s() @(%d,%d)\n",
node1.getClass().getSimpleName(),
getter.getName(),
((ASTNode)node1).getOffset(),
((ASTNode)node1).getLength());
throw e;
}
}
}
// private static String spaces(int n) {
// char[] spaces = new char[n*2];
// Arrays.fill(spaces, ' ');
// return new String(spaces);
// }
}

View file

@ -36,6 +36,7 @@ import org.eclipse.cdt.core.dom.ast.IASTExpressionStatement;
import org.eclipse.cdt.core.dom.ast.IASTFunctionDefinition;
import org.eclipse.cdt.core.dom.ast.IASTIdExpression;
import org.eclipse.cdt.core.dom.ast.IASTName;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTStatement;
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit;
@ -70,6 +71,7 @@ import org.eclipse.cdt.core.parser.NullLogService;
import org.eclipse.cdt.core.parser.ParserLanguage;
import org.eclipse.cdt.core.parser.ParserMode;
import org.eclipse.cdt.core.parser.ScannerInfo;
import org.eclipse.cdt.core.parser.tests.ASTComparer;
import org.eclipse.cdt.core.parser.tests.scanner.FileCodeReaderFactory;
import org.eclipse.cdt.core.testplugin.CTestPlugin;
import org.eclipse.cdt.core.testplugin.util.BaseTestCase;
@ -141,6 +143,8 @@ public class AST2BaseTest extends BaseTestCase {
parser.setSkipTrivialExpressionsInAggregateInitializers(true);
IASTTranslationUnit tu = parser.parse();
assertTrue(tu.isFrozen());
validateCopy(tu);
if (parser.encounteredError() && expectNoProblems)
throw new ParserException("FAILURE"); //$NON-NLS-1$
@ -260,6 +264,14 @@ public class AST2BaseTest extends BaseTestCase {
return s.getExpression();
}
protected <T extends IASTNode> T validateCopy(T tu) {
IASTNode copy = tu.copy();
assertFalse(copy.isFrozen());
ASTComparer.assertCopy(tu, copy);
return (T) copy;
}
static protected class CNameCollector extends CASTVisitor {
{
shouldVisitNames = true;

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.parser.tests.rewrite.comenthandler;
import junit.framework.TestCase;
import org.eclipse.cdt.core.dom.ast.IASTComment;
import org.eclipse.cdt.core.dom.ast.IASTNode;
import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
import org.eclipse.cdt.internal.core.dom.parser.cpp.CPPASTName;
import org.eclipse.cdt.internal.core.dom.rewrite.commenthandler.NodeCommentMap;
@ -141,5 +142,8 @@ public class NodeCommentMapTest extends TestCase {
}
//not used
public boolean isBlockComment() {return false;}
public IASTNode copy() {
return null;
}
}
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* ASM Statement as a Declaration.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTASMDeclaration extends IASTDeclaration {
@ -29,4 +30,10 @@ public interface IASTASMDeclaration extends IASTDeclaration {
* @param assembly
*/
public void setAssembly(String assembly);
/**
* @since 5.1
*/
public IASTASMDeclaration copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This is the declarator for an array.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTArrayDeclarator extends IASTDeclarator {
@ -39,4 +40,9 @@ public interface IASTArrayDeclarator extends IASTDeclarator {
*/
public void addArrayModifier(IASTArrayModifier arrayModifier);
/**
* @since 5.1
*/
public IASTArrayDeclarator copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* declares a variable/type which is an array.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTArrayModifier extends IASTNode {
@ -45,4 +46,8 @@ public interface IASTArrayModifier extends IASTNode {
*/
public void setConstantExpression(IASTExpression expression);
/**
* @since 5.1
*/
public IASTArrayModifier copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* y.z()[ t * t ]
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTArraySubscriptExpression extends IASTExpression {
@ -63,4 +64,8 @@ public interface IASTArraySubscriptExpression extends IASTExpression {
*/
public void setSubscriptExpression(IASTExpression expression);
/**
* @since 5.1
*/
public IASTArraySubscriptExpression copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* This interface represents a binary expression.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTBinaryExpression extends IASTExpression {
@ -258,4 +259,9 @@ public interface IASTBinaryExpression extends IASTExpression {
* <code>IASTExpression</code> value
*/
public void setOperand2(IASTExpression expression);
/**
* @since 5.1
*/
public IASTBinaryExpression copy();
}

View file

@ -14,7 +14,12 @@ package org.eclipse.cdt.core.dom.ast;
* This is the break clause in a loop.
*
* @author Doug Schaefer
* @noimplement
*/
public interface IASTBreakStatement extends IASTStatement {
/**
* @since 5.1
*/
public IASTBreakStatement copy();
}

View file

@ -17,6 +17,7 @@ package org.eclipse.cdt.core.dom.ast;
* following this clause.
*
* @author Doug Schaefer
* @noimplement
*/
public interface IASTCaseStatement extends IASTStatement {
@ -40,4 +41,8 @@ public interface IASTCaseStatement extends IASTStatement {
*/
public void setExpression(IASTExpression expression);
/**
* @since 5.1
*/
public IASTCaseStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This interface represents a cast expression of the form (TypeId)operand.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTCastExpression extends IASTExpression {
@ -83,4 +84,8 @@ public interface IASTCastExpression extends IASTExpression {
*/
public IASTTypeId getTypeId();
/**
* @since 5.1
*/
public IASTCastExpression copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* declarations).
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTCompositeTypeSpecifier extends IASTDeclSpecifier , IASTNameOwner {
@ -96,4 +97,9 @@ public interface IASTCompositeTypeSpecifier extends IASTDeclSpecifier , IASTName
*
*/
public IScope getScope();
/**
* @since 5.1
*/
public IASTCompositeTypeSpecifier copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This represents a block of statements.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTCompoundStatement extends IASTStatement {
@ -47,4 +48,9 @@ public interface IASTCompoundStatement extends IASTStatement {
* @return the <code>IScope</code>
*/
public IScope getScope();
/**
* @since 5.1
*/
public IASTCompoundStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* Conditional Expression of the format X ? Y : Z
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTConditionalExpression extends IASTExpression {
@ -87,4 +88,9 @@ public interface IASTConditionalExpression extends IASTExpression {
*/
public void setNegativeResultExpression(IASTExpression expression);
/**
* @since 5.1
*/
public IASTConditionalExpression copy();
}

View file

@ -14,7 +14,12 @@ package org.eclipse.cdt.core.dom.ast;
* This is the continue clause in a loop.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTContinueStatement extends IASTStatement {
/**
* @since 5.1
*/
public IASTContinueStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This is the base interface that represents a declaration specifier sequence.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTDeclSpecifier extends IASTNode {
@ -125,4 +126,9 @@ public interface IASTDeclSpecifier extends IASTNode {
*/
public String getRawSignature();
/**
* @since 5.1
*/
public IASTDeclSpecifier copy();
}

View file

@ -14,8 +14,13 @@ package org.eclipse.cdt.core.dom.ast;
* This is the root class of all declarations.
*
* @author Doug Schaefer
* @noimplement
*/
public interface IASTDeclaration extends IASTNode {
public static final IASTDeclaration[] EMPTY_DECLARATION_ARRAY = new IASTDeclaration[0];
/**
* @since 5.1
*/
public IASTDeclaration copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* A declaration statement that introduces a declaration.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTDeclarationStatement extends IASTStatement {
@ -38,4 +39,9 @@ public interface IASTDeclarationStatement extends IASTStatement {
*/
public void setDeclaration(IASTDeclaration declaration);
/**
* @since 5.1
*/
public IASTDeclarationStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* Base interface for a declarator.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTDeclarator extends IASTNode, IASTNameOwner {
@ -107,4 +108,9 @@ public interface IASTDeclarator extends IASTNode, IASTNameOwner {
*/
public void setInitializer(IASTInitializer initializer);
/**
* @since 5.1
*/
public IASTDeclarator copy();
}

View file

@ -17,7 +17,12 @@ package org.eclipse.cdt.core.dom.ast;
* one statement following this clause.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTDefaultStatement extends IASTStatement {
/**
* @since 5.1
*/
public IASTDefaultStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* Ye ol' do statement.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTDoStatement extends IASTStatement {
@ -62,4 +63,9 @@ public interface IASTDoStatement extends IASTStatement {
*/
public void setCondition(IASTExpression condition);
/**
* @since 5.1
*/
public IASTDoStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This represents an elaborated type specifier in the C & C++ language grammar.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTElaboratedTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner {
@ -74,4 +75,8 @@ public interface IASTElaboratedTypeSpecifier extends IASTDeclSpecifier, IASTName
*/
public void setName(IASTName name);
/**
* @since 5.1
*/
public IASTElaboratedTypeSpecifier copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This interface represents enumerations in C and C++.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwner {
@ -21,6 +22,7 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
* This interface represents an enumerator member of an enum specifier.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTEnumerator extends IASTNode, IASTNameOwner {
/**
@ -70,6 +72,11 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
*/
public IASTExpression getValue();
/**
* @since 5.1
*/
public IASTEnumerator copy();
}
/**
@ -114,4 +121,8 @@ public interface IASTEnumerationSpecifier extends IASTDeclSpecifier, IASTNameOwn
*/
public IASTName getName();
/**
* @since 5.1
*/
public IASTEnumerationSpecifier copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This is the root class of expressions.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTExpression extends IASTNode {
/**
@ -23,4 +24,8 @@ public interface IASTExpression extends IASTNode {
public IType getExpressionType();
/**
* @since 5.1
*/
public IASTExpression copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* Expression List (Comma separated list of expressions).
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTExpressionList extends IASTExpression {
@ -39,4 +40,9 @@ public interface IASTExpressionList extends IASTExpression {
* <code>IASTExpression</code> value to be added.
*/
public void addExpression(IASTExpression expression);
/**
* @since 5.1
*/
public IASTExpressionList copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* Expression statement.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTExpressionStatement extends IASTStatement {
@ -37,4 +38,9 @@ public interface IASTExpressionStatement extends IASTStatement {
* @param expression
*/
public void setExpression(IASTExpression expression);
/**
* @since 5.1
*/
public IASTExpressionStatement copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* size for a bit field.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTFieldDeclarator extends IASTDeclarator {
@ -41,4 +42,8 @@ public interface IASTFieldDeclarator extends IASTDeclarator {
*/
public void setBitFieldSize(IASTExpression size);
/**
* @since 5.1
*/
public IASTFieldDeclarator copy();
}

View file

@ -16,6 +16,7 @@ package org.eclipse.cdt.core.dom.ast;
* expression, def is the field name.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTFieldReference extends IASTExpression, IASTNameOwner {
@ -79,4 +80,9 @@ public interface IASTFieldReference extends IASTExpression, IASTNameOwner {
*/
public void setIsPointerDereference(boolean value);
/**
* @since 5.1
*/
public IASTFieldReference copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* declaration but not both.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTForStatement extends IASTStatement {
@ -111,4 +112,9 @@ public interface IASTForStatement extends IASTStatement {
* @return <code>IScope</code>
*/
public IScope getScope();
/**
* @since 5.1
*/
public IASTForStatement copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* function name expression, x is the parameter expression.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTFunctionCallExpression extends IASTExpression {
@ -64,4 +65,9 @@ public interface IASTFunctionCallExpression extends IASTExpression {
*/
public IASTExpression getParameterExpression();
/**
* @since 5.1
*/
public IASTFunctionCallExpression copy();
}

View file

@ -14,7 +14,12 @@ package org.eclipse.cdt.core.dom.ast;
* This is a declarator for a function.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTFunctionDeclarator extends IASTDeclarator {
/**
* @since 5.1
*/
public IASTFunctionDeclarator copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This is a function definition, i.e. it has a body.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTFunctionDefinition extends IASTDeclaration {
@ -98,4 +99,9 @@ public interface IASTFunctionDefinition extends IASTDeclaration {
* @return <code>IScope</code> representing function body.
*/
public IScope getScope();
/**
* @since 5.1
*/
public IASTFunctionDefinition copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* is not an IASTName, as there are not any bindings for
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTFunctionStyleMacroParameter extends IASTNode {

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* Represents a goto statement.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTGotoStatement extends IASTStatement, IASTNameOwner {
@ -34,4 +35,9 @@ public interface IASTGotoStatement extends IASTStatement, IASTNameOwner {
*/
public void setName(IASTName name);
/**
* @since 5.1
*/
public IASTGotoStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This is a name used in an expression.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTIdExpression extends IASTExpression, IASTNameOwner {
@ -37,4 +38,9 @@ public interface IASTIdExpression extends IASTExpression, IASTNameOwner {
* @param name
*/
public void setName(IASTName name);
/**
* @since 5.1
*/
public IASTIdExpression copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* The if statement including the optional else clause.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTIfStatement extends IASTStatement {
@ -84,4 +85,8 @@ public interface IASTIfStatement extends IASTStatement {
*/
public void setElseClause(IASTStatement elseClause);
/**
* @since 5.1
*/
public IASTIfStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This represents an initializer for a declarator.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTInitializer extends IASTNode {
@ -22,4 +23,8 @@ public interface IASTInitializer extends IASTNode {
*/
public final static IASTInitializer[] EMPTY_INITIALIZER_ARRAY = new IASTInitializer[0];
/**
* @since 5.1
*/
public IASTInitializer copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This is an initializer that is simply an expression.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTInitializerExpression extends IASTInitializer {
@ -38,4 +39,9 @@ public interface IASTInitializerExpression extends IASTInitializer {
* <code>IASTExpression</code>
*/
public void setExpression(IASTExpression expression);
/**
* @since 5.1
*/
public IASTInitializerExpression copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This is an an initializer that is a list of initializers.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTInitializerList extends IASTInitializer {
@ -38,4 +39,9 @@ public interface IASTInitializerList extends IASTInitializer {
* <code>IASTInitializer</code>
*/
public void addInitializer(IASTInitializer initializer);
/**
* @since 5.1
*/
public IASTInitializerList copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* Represents a label statement.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTLabelStatement extends IASTStatement, IASTNameOwner {
@ -42,4 +43,9 @@ public interface IASTLabelStatement extends IASTStatement, IASTNameOwner {
*/
public void setNestedStatement( IASTStatement s );
/**
* @since 5.1
*/
public IASTLabelStatement copy();
}

View file

@ -96,4 +96,9 @@ public interface IASTLiteralExpression extends IASTExpression {
*/
public void setValue(String value);
/**
* @since 5.1
*/
public IASTLiteralExpression copy();
}

View file

@ -95,4 +95,9 @@ public interface IASTName extends IASTNode, IName {
* @since 5.1
*/
public IASTName getLastName();
/**
* @since 5.1
*/
public IASTName copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* class/struct/union names in C.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTNamedTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner {
@ -39,4 +40,8 @@ public interface IASTNamedTypeSpecifier extends IASTDeclSpecifier, IASTNameOwner
*/
public void setName(IASTName name);
/**
* @since 5.1
*/
public IASTNamedTypeSpecifier copy();
}

View file

@ -193,4 +193,23 @@ public interface IASTNode {
* @since 5.1
*/
public boolean isFrozen();
/**
* Returns a copy of the tree rooted at this node.
* The following postconditions hold:
*
* <code>
* copy.getParent() == null
* copy.getPropertyInParent() == null
* copy.isFrozen() == false
* </code>
*
* Preprocessor nodes do not currently support being copied.
*
* @since 5.1
* @throws UnsupportedOperationException if this node or one of its descendants
* does not support copying
*/
public IASTNode copy();
}

View file

@ -14,7 +14,12 @@ package org.eclipse.cdt.core.dom.ast;
* This node represents a null statement. ';'
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTNullStatement extends IASTStatement {
/**
* @since 5.1
*/
public IASTNullStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This class represents a parameter declaration
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTParameterDeclaration extends IASTNode {
/**
@ -67,4 +68,8 @@ public interface IASTParameterDeclaration extends IASTNode {
*/
public void setDeclarator(IASTDeclarator declarator);
/**
* @since 5.1
*/
public IASTParameterDeclaration copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This represents the good ol' * pointer operator.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTPointer extends IASTPointerOperator {
@ -48,4 +49,10 @@ public interface IASTPointer extends IASTPointerOperator {
*/
public void setVolatile(boolean value);
/**
* @since 5.1
*/
public IASTPointer copy();
}

View file

@ -12,6 +12,7 @@ package org.eclipse.cdt.core.dom.ast;
/**
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTPointerOperator extends IASTNode {
@ -20,4 +21,8 @@ public interface IASTPointerOperator extends IASTNode {
*/
public static final IASTPointerOperator[] EMPTY_ARRAY = new IASTPointerOperator[0];
/**
* @since 5.1
*/
public IASTPointerOperator copy();
}

View file

@ -15,6 +15,12 @@ import org.eclipse.cdt.core.parser.IProblem;
/**
* Interface for problems in the ast tree.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTProblem extends IProblem, IASTNode {
/**
* @since 5.1
*/
public IASTProblem copy();
}

View file

@ -15,8 +15,12 @@ package org.eclipse.cdt.core.dom.ast;
* declaration.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTProblemDeclaration extends IASTDeclaration,
IASTProblemHolder {
public interface IASTProblemDeclaration extends IASTDeclaration, IASTProblemHolder {
/**
* @since 5.1
*/
public IASTProblemDeclaration copy();
}

View file

@ -15,8 +15,12 @@ package org.eclipse.cdt.core.dom.ast;
* expression.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTProblemExpression extends IASTExpression,
IASTProblemHolder {
public interface IASTProblemExpression extends IASTExpression, IASTProblemHolder {
/**
* @since 5.1
*/
public IASTProblemExpression copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* holder.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTProblemHolder {
/**
@ -37,4 +38,5 @@ public interface IASTProblemHolder {
* <code>IASTProblem</code>
*/
public void setProblem(IASTProblem p);
}

View file

@ -15,7 +15,12 @@ package org.eclipse.cdt.core.dom.ast;
* statement.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTProblemStatement extends IASTStatement, IASTProblemHolder {
/**
* @since 5.1
*/
public IASTProblemStatement copy();
}

View file

@ -15,7 +15,12 @@ package org.eclipse.cdt.core.dom.ast;
* type-id.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTProblemTypeId extends IASTTypeId, IASTProblemHolder {
/**
* @since 5.1
*/
public IASTProblemTypeId copy();
}

View file

@ -12,6 +12,7 @@ package org.eclipse.cdt.core.dom.ast;
/**
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTReturnStatement extends IASTStatement {
@ -38,4 +39,8 @@ public interface IASTReturnStatement extends IASTStatement {
*/
public void setReturnValue(IASTExpression returnValue);
/**
* @since 5.1
*/
public IASTReturnStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This represents a decl specifier for a built-in type.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTSimpleDeclSpecifier extends IASTDeclSpecifier {
@ -130,4 +131,9 @@ public interface IASTSimpleDeclSpecifier extends IASTDeclSpecifier {
*/
public void setShort(boolean value);
/**
* @since 5.1
*/
public IASTSimpleDeclSpecifier copy();
}

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.core.dom.ast;
* followed by a list of declarators.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTSimpleDeclaration extends IASTDeclaration {
@ -65,4 +66,8 @@ public interface IASTSimpleDeclaration extends IASTDeclaration {
*/
public void addDeclarator(IASTDeclarator declarator);
/**
* @since 5.1
*/
public IASTSimpleDeclaration copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This is a declarator for a non K&R C function.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTStandardFunctionDeclarator extends IASTFunctionDeclarator {
@ -54,4 +55,9 @@ public interface IASTStandardFunctionDeclarator extends IASTFunctionDeclarator {
* boolean
*/
public void setVarArgs(boolean value);
/**
* @since 5.1
*/
public IASTStandardFunctionDeclarator copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This is the root interface for statements.
*
* @author Doug Schaefer
* @noimplement
*/
public interface IASTStatement extends IASTNode {
/**
@ -21,4 +22,9 @@ public interface IASTStatement extends IASTNode {
*/
public static final IASTStatement[] EMPTY_STATEMENT_ARRAY = new IASTStatement[0];
/**
* @since 5.1
*/
public IASTStatement copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* The switch statement.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTSwitchStatement extends IASTStatement {
@ -64,4 +65,8 @@ public interface IASTSwitchStatement extends IASTStatement {
*/
public void setBody(IASTStatement body);
/**
* @since 5.1
*/
public IASTSwitchStatement copy();
}

View file

@ -292,4 +292,16 @@ public interface IASTTranslationUnit extends IASTNode, IAdaptable {
* @since 5.1
*/
public void freeze();
/**
* Returns a copy of the AST, however the ILocationResolver
* and the preprocessor nodes are not copied.
*
* @see IASTNode#copy()
*
* @noreference This method is not intended to be referenced by clients.
* @since 5.1
*/
public IASTTranslationUnit copy();
}

View file

@ -12,6 +12,7 @@ package org.eclipse.cdt.core.dom.ast;
/**
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTTypeId extends IASTNode {
@ -58,4 +59,9 @@ public interface IASTTypeId extends IASTNode {
* @param abstractDeclarator <code>IASTDeclarator</code>
*/
public void setAbstractDeclarator(IASTDeclarator abstractDeclarator);
/**
* @since 5.1
*/
public IASTTypeId copy();
}

View file

@ -13,6 +13,7 @@ package org.eclipse.cdt.core.dom.ast;
/**
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTTypeIdExpression extends IASTExpression {
@ -75,4 +76,8 @@ public interface IASTTypeIdExpression extends IASTExpression {
*/
public IASTTypeId getTypeId();
/**
* @since 5.1
*/
public IASTTypeIdExpression copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* This interface is used to represent a unary expression in the AST.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTUnaryExpression extends IASTExpression {
@ -152,4 +153,8 @@ public interface IASTUnaryExpression extends IASTExpression {
*/
public void setOperand(IASTExpression expression);
/**
* @since 5.1
*/
public IASTUnaryExpression copy();
}

View file

@ -14,6 +14,7 @@ package org.eclipse.cdt.core.dom.ast;
* Ye ol' while statement.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IASTWhileStatement extends IASTStatement {
@ -58,4 +59,8 @@ public interface IASTWhileStatement extends IASTStatement {
*/
public void setBody(IASTStatement body);
/**
* @since 5.1
*/
public IASTWhileStatement copy();
}

View file

@ -18,6 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
* instance = { def[0] = 9 };
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTArrayDesignator extends ICASTDesignator {
@ -43,4 +44,8 @@ public interface ICASTArrayDesignator extends ICASTDesignator {
*/
public void setSubscriptExpression(IASTExpression value);
/**
* @since 5.1
*/
public ICASTArrayDesignator copy();
}

View file

@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTArrayModifier;
* modifiers (const, restrict, etc.) as well as variable sized arrays.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTArrayModifier extends IASTArrayModifier {
@ -94,4 +95,9 @@ public interface ICASTArrayModifier extends IASTArrayModifier {
* boolean
*/
public void setVariableSized(boolean value);
/**
* @since 5.1
*/
public ICASTArrayModifier copy();
}

View file

@ -16,8 +16,13 @@ import org.eclipse.cdt.core.dom.ast.IASTCompositeTypeSpecifier;
* Structs and Unions in C can be qualified w/restrict keyword.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTCompositeTypeSpecifier extends
IASTCompositeTypeSpecifier, ICASTDeclSpecifier {
/**
* @since 5.1
*/
public ICASTCompositeTypeSpecifier copy();
}

View file

@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
* C extension to IASTDeclSpecifier. (restrict keyword)
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTDeclSpecifier extends IASTDeclSpecifier {
@ -33,4 +34,9 @@ public interface ICASTDeclSpecifier extends IASTDeclSpecifier {
*/
public void setRestrict(boolean value);
/**
* @since 5.1
*/
public ICASTDeclSpecifier copy();
}

View file

@ -18,7 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IASTInitializer;
* .t[1] = 3 };
*
* @author jcamelon
*
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTDesignatedInitializer extends IASTInitializer {
@ -72,4 +72,9 @@ public interface ICASTDesignatedInitializer extends IASTInitializer {
* <code>IASTInitializer</code>
*/
public void setOperandInitializer(IASTInitializer rhs);
/**
* @since 5.1
*/
public ICASTDesignatedInitializer copy();
}

View file

@ -16,7 +16,12 @@ import org.eclipse.cdt.core.dom.ast.IASTNode;
* Base interface for all C-style designators.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTDesignator extends IASTNode {
/**
* @since 5.1
*/
public ICASTDesignator copy();
}

View file

@ -17,8 +17,13 @@ import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
* for the addition of the restrict keyword.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTElaboratedTypeSpecifier extends
IASTElaboratedTypeSpecifier, ICASTDeclSpecifier {
/**
* @since 5.1
*/
public ICASTElaboratedTypeSpecifier copy();
}

View file

@ -16,8 +16,13 @@ import org.eclipse.cdt.core.dom.ast.IASTEnumerationSpecifier;
* C Enumeration decl specifier. Allows for "restrict enum X { a, b, c };
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTEnumerationSpecifier extends ICASTDeclSpecifier,
IASTEnumerationSpecifier {
/**
* @since 5.1
*/
public ICASTEnumerationSpecifier copy();
}

View file

@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTName;
* Specific Designator that represents a field reference.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTFieldDesignator extends ICASTDesignator {
@ -41,4 +42,9 @@ public interface ICASTFieldDesignator extends ICASTDesignator {
* <code>IASTName</code>
*/
public void setName(IASTName name);
/**
* @since 5.1
*/
public ICASTFieldDesignator copy();
}

View file

@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTPointer;
* C-specific pointer. (includes restrict modifier).
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTPointer extends IASTPointer {
@ -33,4 +34,9 @@ public interface ICASTPointer extends IASTPointer {
*/
void setRestrict(boolean value);
/**
* @since 5.1
*/
public ICASTPointer copy();
}

View file

@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTSimpleDeclSpecifier;
* This interface represents a built-in type in C.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTSimpleDeclSpecifier extends IASTSimpleDeclSpecifier,
ICASTDeclSpecifier {
@ -71,4 +72,9 @@ public interface ICASTSimpleDeclSpecifier extends IASTSimpleDeclSpecifier,
*/
public void setLongLong(boolean value);
/**
* @since 5.1
*/
public ICASTSimpleDeclSpecifier copy();
}

View file

@ -19,6 +19,8 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeId;
* C Expression of the format type-id { initializer }
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*
*/
public interface ICASTTypeIdInitializerExpression extends IASTExpression {
@ -67,4 +69,9 @@ public interface ICASTTypeIdInitializerExpression extends IASTExpression {
*/
public void setInitializer(IASTInitializer initializer);
/**
* @since 5.1
*/
public ICASTTypeIdInitializerExpression copy();
}

View file

@ -17,8 +17,12 @@ import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
* includes the abiliy to use the restrict modifier.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICASTTypedefNameSpecifier extends IASTNamedTypeSpecifier,
ICASTDeclSpecifier {
public interface ICASTTypedefNameSpecifier extends IASTNamedTypeSpecifier, ICASTDeclSpecifier {
/**
* @since 5.1
*/
public ICASTTypedefNameSpecifier copy();
}

View file

@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTBinaryExpression;
* C++ adds a few more binary expressions over C.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTBinaryExpression extends IASTBinaryExpression {
@ -35,4 +36,9 @@ public interface ICPPASTBinaryExpression extends IASTBinaryExpression {
*/
@Deprecated
public static final int op_last = IASTBinaryExpression.op_last;
/**
* @since 5.1
*/
public ICPPASTBinaryExpression copy();
}

View file

@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTCastExpression;
* C++ adds in additional cast-style expressions.
*
* @author jcamelon
* @noimplement
*/
public interface ICPPASTCastExpression extends IASTCastExpression {
@ -43,4 +44,10 @@ public interface ICPPASTCastExpression extends IASTCastExpression {
* <code>op_last</code> is for subinterfaces to extend.
*/
public static final int op_last = op_const_cast;
/**
* @since 5.1
*/
public ICPPASTCastExpression copy();
}

View file

@ -20,7 +20,7 @@ import org.eclipse.cdt.core.dom.ast.IScope;
* @see ICPPASTFunctionWithTryBlock
* @see ICPPASTTryBlockStatement
*
* @noimplement This interface is not intended to be implemented by clients.
* @noimplement
*/
public interface ICPPASTCatchHandler extends IASTStatement {
@ -73,4 +73,9 @@ public interface ICPPASTCatchHandler extends IASTStatement {
* @since 5.1
*/
public IScope getScope();
/**
* @since 5.1
*/
public ICPPASTCatchHandler copy();
}

View file

@ -51,6 +51,7 @@ public interface ICPPASTCompositeTypeSpecifier extends
* Base Specifiers are where a class expresses from whom it inherits.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public static interface ICPPASTBaseSpecifier extends IASTNode, IASTNameOwner {
/**
@ -125,6 +126,11 @@ public interface ICPPASTCompositeTypeSpecifier extends
* <code>IASTName</code>
*/
public void setName(IASTName name);
/**
* @since 5.1
*/
public ICPPASTBaseSpecifier copy();
}
/**
@ -146,4 +152,9 @@ public interface ICPPASTCompositeTypeSpecifier extends
* @since 5.1
*/
public ICPPClassScope getScope();
/**
* @since 5.1
*/
public ICPPASTCompositeTypeSpecifier copy();
}

View file

@ -23,6 +23,8 @@ import org.eclipse.cdt.core.dom.ast.IASTNameOwner;
* X();
* };
* X::X : a(0) {} // a(0) is a constructor chain initializer.
*
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTConstructorChainInitializer extends IASTInitializer, IASTNameOwner {
/**
@ -73,4 +75,8 @@ public interface ICPPASTConstructorChainInitializer extends IASTInitializer, IAS
*/
public void setInitializerValue(IASTExpression expression);
/**
* @since 5.1
*/
public ICPPASTConstructorChainInitializer copy();
}

View file

@ -18,6 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IASTInitializer;
* This is an initializer that is a call to the constructor for the declarator.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTConstructorInitializer extends IASTInitializer {
@ -42,4 +43,8 @@ public interface ICPPASTConstructorInitializer extends IASTInitializer {
*/
public void setExpression(IASTExpression expression);
/**
* @since 5.1
*/
public ICPPASTConstructorInitializer copy();
}

View file

@ -18,6 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IASTTypeId;
* This interface represents a C++ conversion member function.
*
* @author dsteffle
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTConversionName extends IASTName {
public static final ASTNodeProperty TYPE_ID=new ASTNodeProperty(
@ -37,4 +38,9 @@ public interface ICPPASTConversionName extends IASTName {
* @param typeId
*/
public void setTypeId(IASTTypeId typeId);
/**
* @since 5.1
*/
public ICPPASTConversionName copy();
}

View file

@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclSpecifier;
* C++ adds additional modifiers and types for decl specifier sequence.
*
* @author Doug Schaefer
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
@ -76,4 +77,9 @@ public interface ICPPASTDeclSpecifier extends IASTDeclSpecifier {
*/
public void setExplicit(boolean value);
/**
* @since 5.1
*/
public ICPPASTDeclSpecifier copy();
}

View file

@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTExpression;
* This interface represents a delete expression. delete [] operand;
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTDeleteExpression extends IASTExpression {
@ -69,4 +70,10 @@ public interface ICPPASTDeleteExpression extends IASTExpression {
*/
public boolean isVectored();
/**
* @since 5.1
*/
public ICPPASTDeleteExpression copy();
}

View file

@ -16,6 +16,7 @@ import org.eclipse.cdt.core.dom.ast.IASTElaboratedTypeSpecifier;
* Elaborated types in C++ include classes.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTElaboratedTypeSpecifier extends
IASTElaboratedTypeSpecifier, ICPPASTDeclSpecifier {
@ -30,4 +31,9 @@ public interface ICPPASTElaboratedTypeSpecifier extends
*/
public static final int k_last = k_class;
/**
* @since 5.1
*/
public ICPPASTElaboratedTypeSpecifier copy();
}

View file

@ -17,6 +17,8 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
* This interface represents an explict template instantiation.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*
*/
public interface ICPPASTExplicitTemplateInstantiation extends IASTDeclaration {
@ -42,4 +44,8 @@ public interface ICPPASTExplicitTemplateInstantiation extends IASTDeclaration {
*/
public void setDeclaration(IASTDeclaration declaration);
/**
* @since 5.1
*/
public ICPPASTExplicitTemplateInstantiation copy();
}

View file

@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTFieldReference;
* specify the parse.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTFieldReference extends IASTFieldReference {
@ -33,4 +34,9 @@ public interface ICPPASTFieldReference extends IASTFieldReference {
*/
public void setIsTemplate(boolean value);
/**
* @since 5.1
*/
public ICPPASTFieldReference copy();
}

View file

@ -14,10 +14,19 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTForStatement;
/**
*
*
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTForStatement extends IASTForStatement {
public static final ASTNodeProperty CONDITION_DECLARATION = new ASTNodeProperty( "org.eclipse.cdt.core.dom.ast.cpp.ICPPASTForStatement"); //$NON-NLS-1$
public void setConditionDeclaration( IASTDeclaration d );
public IASTDeclaration getConditionDeclaration();
/**
* @since 5.1
*/
public ICPPASTForStatement copy();
}

View file

@ -103,4 +103,9 @@ public interface ICPPASTFunctionDeclarator extends IASTStandardFunctionDeclarato
@Deprecated
public void addConstructorToChain(ICPPASTConstructorChainInitializer initializer);
/**
* @since 5.1
*/
public ICPPASTFunctionDeclarator copy();
}

View file

@ -37,4 +37,9 @@ public interface ICPPASTFunctionDefinition extends IASTFunctionDefinition {
* Adds a member initializer to this function definition.
*/
public void addMemberInitializer(ICPPASTConstructorChainInitializer initializer);
/**
* @since 5.1
*/
public ICPPASTFunctionDefinition copy();
}

View file

@ -15,6 +15,7 @@ import org.eclipse.cdt.core.dom.ast.ASTNodeProperty;
/**
* @deprecated, use {@link ICPPASTFunctionWithTryBlock}, instead.
* @noimplement This interface is not intended to be implemented by clients.
*/
@Deprecated
public interface ICPPASTFunctionTryBlockDeclarator extends
@ -41,4 +42,9 @@ public interface ICPPASTFunctionTryBlockDeclarator extends
* @return <code>ICPPASTCatchHandler</code>
*/
public ICPPASTCatchHandler[] getCatchHandlers();
/**
* @since 5.1
*/
public ICPPASTFunctionTryBlockDeclarator copy();
}

View file

@ -40,4 +40,9 @@ public interface ICPPASTFunctionWithTryBlock extends ICPPASTFunctionDefinition {
*/
public ICPPASTCatchHandler[] getCatchHandlers();
/**
* @since 5.1
*/
public ICPPASTFunctionWithTryBlock copy();
}

View file

@ -14,6 +14,11 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
import org.eclipse.cdt.core.dom.ast.IASTIfStatement;
import org.eclipse.cdt.core.dom.ast.IScope;
/**
*
* @noimplement This interface is not intended to be implemented by clients.
*
*/
public interface ICPPASTIfStatement extends IASTIfStatement {
public IASTDeclaration getConditionDeclaration();
@ -25,4 +30,9 @@ public interface ICPPASTIfStatement extends IASTIfStatement {
* @return <code>IScope</code>
*/
public IScope getScope();
/**
* @since 5.1
*/
public ICPPASTIfStatement copy();
}

View file

@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTDeclaration;
* This interface represents a linkage specification. e.g. extern "C" { ... }
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTLinkageSpecification extends IASTDeclaration {
@ -56,4 +57,9 @@ public interface ICPPASTLinkageSpecification extends IASTDeclaration {
* <code>IASTDeclaration</code>
*/
public void addDeclaration(IASTDeclaration declaration);
/**
* @since 5.1
*/
public ICPPASTLinkageSpecification copy();
}

View file

@ -38,4 +38,10 @@ public interface ICPPASTLiteralExpression extends IASTLiteralExpression {
* <code>lk_last</code> is maintained for future subinterfaces.
*/
public static final int lk_last = lk_false;
/**
* @since 5.1
*/
public ICPPASTLiteralExpression copy();
}

View file

@ -17,6 +17,7 @@ import org.eclipse.cdt.core.dom.ast.IASTNamedTypeSpecifier;
* typename.
*
* @author jcamelon
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICPPASTNamedTypeSpecifier extends IASTNamedTypeSpecifier,
ICPPASTDeclSpecifier {
@ -36,4 +37,9 @@ public interface ICPPASTNamedTypeSpecifier extends IASTNamedTypeSpecifier,
*/
public void setIsTypename(boolean value);
/**
* @since 5.1
*/
public ICPPASTNamedTypeSpecifier copy();
}

Some files were not shown because too many files have changed in this diff Show more