1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-23 17:05:26 +02:00

Removed unused deprecated methods from I*NodeFactory API and changed the

deprecated methods still being used by lrparser to be internal.

Change-Id: Id5635443360c9be20c714be5d3d92bbf46ee9da3
This commit is contained in:
Sergey Prigogin 2016-03-14 13:59:49 -07:00
parent 880b1b606a
commit 7ad8329300
4 changed files with 100 additions and 147 deletions

View file

@ -42,7 +42,6 @@ import org.eclipse.cdt.core.parser.IToken;
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface INodeFactory {
/** @since 5.10 */
public IASTAlignmentSpecifier newAlignmentSpecifier(IASTExpression expression);
@ -105,12 +104,6 @@ public interface INodeFactory {
public IASTForStatement newForStatement(IASTStatement init, IASTExpression condition,
IASTExpression iterationExpression, IASTStatement body);
/**
* @deprecated Replaced by {@link #newFunctionCallExpression(IASTExpression, IASTInitializerClause[])}
*/
@Deprecated
public IASTFunctionCallExpression newFunctionCallExpression(IASTExpression idExpr, IASTExpression argList);
/**
* @since 5.2
@ -122,13 +115,6 @@ public interface INodeFactory {
public IASTFunctionDefinition newFunctionDefinition(IASTDeclSpecifier declSpecifier,
IASTFunctionDeclarator declarator, IASTStatement bodyStatement);
/**
* @deprecated Use newGCCAttributeList() instead.
* @since 5.7
*/
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.IGCCASTAttributeSpecifier newGCCAttributeSpecifier();
/**
* @since 6.0
*/
@ -147,12 +133,6 @@ public interface INodeFactory {
public IASTIfStatement newIfStatement(IASTExpression condition, IASTStatement then, IASTStatement elseClause);
/**
* @deprecated Replaced by {@link #newEqualsInitializer(IASTInitializerClause)}.
*/
@Deprecated
public IASTInitializerExpression newInitializerExpression(IASTExpression expression);
public IASTInitializerList newInitializerList();
public IASTLabelStatement newLabelStatement(IASTName name, IASTStatement nestedStatement);
@ -252,4 +232,26 @@ public interface INodeFactory {
* @since 5.2
*/
public void setOffsets(IASTNode node, int offset, int endOffset);
/**
* @deprecated Replaced by {@link #newFunctionCallExpression(IASTExpression, IASTInitializerClause[])}
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public IASTFunctionCallExpression newFunctionCallExpression(IASTExpression idExpr, IASTExpression argList);
/**
* @deprecated Replaced by {@link #newEqualsInitializer(IASTInitializerClause)}.
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public IASTInitializerExpression newInitializerExpression(IASTExpression expression);
/**
* @deprecated Use newGCCAttributeList() instead.
* @noreference This method is not intended to be referenced by clients.
* @since 5.7
*/
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.IGCCASTAttributeSpecifier newGCCAttributeSpecifier();
}

View file

@ -40,12 +40,6 @@ public interface ICNodeFactory extends INodeFactory {
@Override
public ICASTCompositeTypeSpecifier newCompositeTypeSpecifier(int key, IASTName name);
/**
* @deprecated Replaced by {@link #newDesignatedInitializer(IASTInitializerClause)}.
*/
@Deprecated
public ICASTDesignatedInitializer newDesignatedInitializer(IASTInitializer rhs);
/**
* @since 5.2
@ -68,15 +62,22 @@ public interface ICNodeFactory extends INodeFactory {
@Override
public ICASTSimpleDeclSpecifier newSimpleDeclSpecifier();
/**
* @deprecated Replaced by {@link #newSimpleDeclSpecifier()}
*/
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.c.IGCCASTSimpleDeclSpecifier newSimpleDeclSpecifierGCC(IASTExpression typeofExpression);
@Override
public ICASTTypedefNameSpecifier newTypedefNameSpecifier(IASTName name);
@Override
public ICASTTypeIdInitializerExpression newTypeIdInitializerExpression(IASTTypeId typeId, IASTInitializer initializer);
/**
* @deprecated Replaced by {@link #newDesignatedInitializer(IASTInitializerClause)}.
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public ICASTDesignatedInitializer newDesignatedInitializer(IASTInitializer rhs);
/**
* @deprecated Replaced by {@link #newSimpleDeclSpecifier()}
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.c.IGCCASTSimpleDeclSpecifier newSimpleDeclSpecifierGCC(IASTExpression typeofExpression);
}

View file

@ -77,21 +77,11 @@ public interface ICPPNodeFactory extends INodeFactory {
*/
public ICPPASTAttribute newAttribute(char[] name, char[] scope, IASTToken argumentClause, boolean packExpansion);
/**
* @deprecated Use newAttributeList() instead.
* @since 5.7
*/
@Deprecated
public ICPPASTAttributeSpecifier newAttributeSpecifier();
/**
* @since 6.0
*/
public ICPPASTAttributeList newAttributeList();
@Deprecated
public ICPPASTBaseSpecifier newBaseSpecifier(IASTName name, int visibility, boolean isVirtual);
/**
* @since 5.8
*/
@ -128,23 +118,11 @@ public interface ICPPNodeFactory extends INodeFactory {
@Override
public ICPPASTCompositeTypeSpecifier newCompositeTypeSpecifier(int key, IASTName name);
/**
* @deprecated Replaced by {@link #newConstructorChainInitializer(IASTName, IASTInitializer)}
*/
@Deprecated
public ICPPASTConstructorChainInitializer newConstructorChainInitializer(IASTName memberInitializerId, IASTExpression initializerValue);
/**
* @since 5.2
*/
public ICPPASTConstructorChainInitializer newConstructorChainInitializer(IASTName id, IASTInitializer initializer);
/**
* @deprecated Replaced by {@link #newConstructorInitializer(IASTInitializerClause[])}.
*/
@Deprecated
public ICPPASTConstructorInitializer newConstructorInitializer(IASTExpression exp);
/**
* @since 5.2
*/
@ -180,12 +158,6 @@ public interface ICPPNodeFactory extends INodeFactory {
public ICPPASTExplicitTemplateInstantiation newExplicitTemplateInstantiation(IASTDeclaration declaration);
/**
* @deprecated Replaced by {@link #newExplicitTemplateInstantiation(IASTDeclaration)}.
*/
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTExplicitTemplateInstantiation newExplicitTemplateInstantiationGPP(IASTDeclaration declaration);
@Override
public ICPPASTExpressionList newExpressionList();
@ -212,13 +184,6 @@ public interface ICPPNodeFactory extends INodeFactory {
public ICPPASTForStatement newForStatement(IASTStatement init, IASTExpression condition,
IASTExpression iterationExpression, IASTStatement body);
/**
* @deprecated Replaced by {@link #newFunctionCallExpression(IASTExpression, IASTInitializerClause[])}.
*/
@Override
@Deprecated
public ICPPASTFunctionCallExpression newFunctionCallExpression(IASTExpression idExpr, IASTExpression argList);
/**
* @since 5.2
*/
@ -268,12 +233,6 @@ public interface ICPPNodeFactory extends INodeFactory {
public ICPPASTNaryTypeIdExpression newNaryTypeIdExpression(ICPPASTNaryTypeIdExpression.Operator operator,
ICPPASTTypeId[] operands);
/**
* @deprecated Replaced by {@link #newNewExpression(IASTInitializerClause[], IASTInitializer, IASTTypeId)}
*/
@Deprecated
public ICPPASTNewExpression newNewExpression(IASTExpression placement, IASTExpression initializer, IASTTypeId typeId);
/**
* @since 5.2
*/
@ -290,20 +249,8 @@ public interface ICPPNodeFactory extends INodeFactory {
@Override
public ICPPASTParameterDeclaration newParameterDeclaration(IASTDeclSpecifier declSpec, IASTDeclarator declarator);
/**
* @deprecated Replaced by {@link #newPointer()}.
*/
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointer newPointerGPP();
public ICPPASTPointerToMember newPointerToMember(IASTName name);
/**
* @deprecated Replaced by {@link #newPointerToMember(IASTName)}.
*/
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointerToMember newPointerToMemberGPP(IASTName name);
public IASTProblemTypeId newProblemTypeId(IASTProblem problem);
/**
@ -312,12 +259,6 @@ public interface ICPPNodeFactory extends INodeFactory {
*/
public ICPPASTQualifiedName newQualifiedName(ICPPASTName name);
/**
* @deprecated Replaced by {@link #newQualifiedName(ICPPASTName)}.
*/
@Deprecated
public ICPPASTQualifiedName newQualifiedName();
/**
* Creates an {@link ICPPASTQualifiedName} and adds name qualifiers for the
* elements of {@code nameQualifiers}. {@code nameQualifiers} cannot contain decltype specifiers
@ -349,11 +290,6 @@ public interface ICPPNodeFactory extends INodeFactory {
*/
public ICPPASTRangeBasedForStatement newRangeBasedForStatement();
/**
* @deprecated Replaced by {@link #newReferenceOperator(boolean)}.
*/
@Deprecated public ICPPASTReferenceOperator newReferenceOperator();
/**
* Creates an lvalue or rvalue reference operator.
* @since 5.2
@ -368,23 +304,11 @@ public interface ICPPNodeFactory extends INodeFactory {
@Override
public ICPPASTSimpleDeclSpecifier newSimpleDeclSpecifier();
/**
* @deprecated Replaced by {@link #newSimpleDeclSpecifier()}
*/
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTSimpleDeclSpecifier newSimpleDeclSpecifierGPP();
/**
* @since 5.2
*/
public ICPPASTSimpleTypeConstructorExpression newSimpleTypeConstructorExpression(ICPPASTDeclSpecifier declSpec, IASTInitializer initializer);
/**
* @deprecated Replaced by {@link #newSimpleTypeConstructorExpression(ICPPASTDeclSpecifier, IASTInitializer)}
*/
@Deprecated
public ICPPASTSimpleTypeConstructorExpression newSimpleTypeConstructorExpression(int type, IASTExpression expression);
public ICPPASTSimpleTypeTemplateParameter newSimpleTypeTemplateParameter(int type, IASTName name, IASTTypeId typeId);
/**
@ -431,12 +355,6 @@ public interface ICPPNodeFactory extends INodeFactory {
@Override
public ICPPASTTypeIdExpression newTypeIdExpression(int operator, IASTTypeId typeId);
/**
* @deprecated Replaced by {@link #newSimpleTypeConstructorExpression(ICPPASTDeclSpecifier, IASTInitializer)}
*/
@Deprecated
public ICPPASTTypenameExpression newTypenameExpression(IASTName qualifiedName, IASTExpression expr, boolean isTemplate);
/**
* @since 5.6
*/
@ -462,4 +380,69 @@ public interface ICPPNodeFactory extends INodeFactory {
@Override
public ICPPASTWhileStatement newWhileStatement(IASTExpression condition, IASTStatement body);
/**
* @deprecated Replaced by {@link #newConstructorChainInitializer(IASTName, IASTInitializer)}
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public ICPPASTConstructorChainInitializer newConstructorChainInitializer(IASTName memberInitializerId, IASTExpression initializerValue);
/**
* @deprecated Replaced by {@link #newConstructorInitializer(IASTInitializerClause[])}.
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public ICPPASTConstructorInitializer newConstructorInitializer(IASTExpression exp);
/**
* @deprecated Replaced by {@link #newBaseSpecifier(ICPPASTNameSpecifier, int, boolean)}
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public ICPPASTBaseSpecifier newBaseSpecifier(IASTName name, int visibility, boolean isVirtual);
/**
* @deprecated Replaced by {@link #newFunctionCallExpression(IASTExpression, IASTInitializerClause[])}.
* @noreference This method is not intended to be referenced by clients.
*/
@Override
@Deprecated
public ICPPASTFunctionCallExpression newFunctionCallExpression(IASTExpression idExpr, IASTExpression argList);
/**
* @deprecated Replaced by {@link #newNewExpression(IASTInitializerClause[], IASTInitializer, IASTTypeId)}
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public ICPPASTNewExpression newNewExpression(IASTExpression placement, IASTExpression initializer, IASTTypeId typeId);
/**
* @deprecated Replaced by {@link #newQualifiedName(ICPPASTName)}.
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public ICPPASTQualifiedName newQualifiedName();
/**
* @deprecated Replaced by {@link #newReferenceOperator(boolean)}.
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public ICPPASTReferenceOperator newReferenceOperator();
/**
* @deprecated Replaced by {@link #newSimpleTypeConstructorExpression(ICPPASTDeclSpecifier, IASTInitializer)}
* @noreference This method is not intended to be referenced by clients.
*/
@Deprecated
public ICPPASTTypenameExpression newTypenameExpression(IASTName qualifiedName, IASTExpression expr, boolean isTemplate);
/**
* @deprecated Use newAttributeList() instead.
* @noreference This method is not intended to be referenced by clients.
* @since 5.7
*/
@Deprecated
public ICPPASTAttributeSpecifier newAttributeSpecifier();
}

View file

@ -398,12 +398,6 @@ public class CPPNodeFactory extends NodeFactory implements ICPPNodeFactory {
return new CPPASTExplicitTemplateInstantiation(declaration);
}
@Override
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTExplicitTemplateInstantiation newExplicitTemplateInstantiationGPP(IASTDeclaration declaration) {
return new GPPASTExplicitTemplateInstantiation(declaration);
}
@Override
public ICPPASTExpressionList newExpressionList() {
return new CPPASTExpressionList();
@ -622,23 +616,11 @@ public class CPPNodeFactory extends NodeFactory implements ICPPNodeFactory {
return new CPPASTPointer();
}
@Override
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointer newPointerGPP() {
return new GPPASTPointer();
}
@Override
public ICPPASTPointerToMember newPointerToMember(IASTName name) {
return new CPPASTPointerToMember(name);
}
@Override
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTPointerToMember newPointerToMemberGPP(IASTName name) {
return new GPPASTPointerToMember(name);
}
@Override
public IASTProblem newProblem(int id, char[] arg, boolean error) {
return new CPPASTProblem(id, arg, error);
@ -719,27 +701,12 @@ public class CPPNodeFactory extends NodeFactory implements ICPPNodeFactory {
return new CPPASTSimpleDeclSpecifier();
}
@Override
@Deprecated
public org.eclipse.cdt.core.dom.ast.gnu.cpp.IGPPASTSimpleDeclSpecifier newSimpleDeclSpecifierGPP() {
return new GPPASTSimpleDeclSpecifier();
}
@Override
public ICPPASTSimpleTypeConstructorExpression newSimpleTypeConstructorExpression(
ICPPASTDeclSpecifier declSpec, IASTInitializer initializer) {
return new CPPASTSimpleTypeConstructorExpression(declSpec, initializer);
}
@Override
@Deprecated
public ICPPASTSimpleTypeConstructorExpression newSimpleTypeConstructorExpression(int type, IASTExpression expression) {
CPPASTSimpleTypeConstructorExpression result = new CPPASTSimpleTypeConstructorExpression();
result.setSimpleType(type);
result.setInitialValue(expression);
return result;
}
@Override
public ICPPASTSimpleTypeTemplateParameter newSimpleTypeTemplateParameter(int type, IASTName name, IASTTypeId typeId) {
return new CPPASTSimpleTypeTemplateParameter(type, name, typeId);