mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Added missing @Override annotations.
This commit is contained in:
parent
5b9c3d95a5
commit
a85d7aea25
3 changed files with 32 additions and 15 deletions
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* John Camelon (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
@ -18,7 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IASTParameterDeclaration;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPASTParameterDeclaration extends ICPPASTTemplateParameter, IASTParameterDeclaration {
|
||||
|
||||
/**
|
||||
* @since 5.2
|
||||
*/
|
||||
|
@ -27,15 +26,18 @@ public interface ICPPASTParameterDeclaration extends ICPPASTTemplateParameter, I
|
|||
/**
|
||||
* @since 5.1
|
||||
*/
|
||||
@Override
|
||||
public ICPPASTParameterDeclaration copy();
|
||||
|
||||
/**
|
||||
* @since 5.3
|
||||
*/
|
||||
@Override
|
||||
public ICPPASTParameterDeclaration copy(CopyStyle style);
|
||||
|
||||
/**
|
||||
* @since 5.2
|
||||
*/
|
||||
@Override
|
||||
public ICPPASTDeclarator getDeclarator();
|
||||
}
|
||||
|
|
|
@ -6,10 +6,10 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* John Camelon(IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Bryan Wilkinson (QNX)
|
||||
* Anton Leherbauer (Wind River Systems)
|
||||
* John Camelon(IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Bryan Wilkinson (QNX)
|
||||
* Anton Leherbauer (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.core.dom.parser.cpp;
|
||||
|
||||
|
@ -45,10 +45,12 @@ public class CPPASTName extends CPPASTNameBase implements ICPPASTCompletionConte
|
|||
name = CharArrayUtils.EMPTY;
|
||||
}
|
||||
|
||||
public CPPASTName copy() {
|
||||
@Override
|
||||
public CPPASTName copy() {
|
||||
return copy(CopyStyle.withoutLocations);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CPPASTName copy(CopyStyle style) {
|
||||
CPPASTName copy = new CPPASTName(name == null ? null : name.clone());
|
||||
copy.setOffsetAndLength(this);
|
||||
|
@ -78,6 +80,7 @@ public class CPPASTName extends CPPASTNameBase implements ICPPASTCompletionConte
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinding[] findBindings(IASTName n, boolean isPrefix, String[] namespaces) {
|
||||
IASTNode parent = getParent();
|
||||
if (parent instanceof ICPPASTElaboratedTypeSpecifier) {
|
||||
|
@ -142,14 +145,17 @@ public class CPPASTName extends CPPASTNameBase implements ICPPASTCompletionConte
|
|||
return (IBinding[])ArrayUtil.removeNulls(IBinding.class, bindings);
|
||||
}
|
||||
|
||||
public char[] toCharArray() {
|
||||
@Override
|
||||
public char[] toCharArray() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public char[] getSimpleID() {
|
||||
@Override
|
||||
public char[] getSimpleID() {
|
||||
return name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public char[] getLookupKey() {
|
||||
return name;
|
||||
}
|
||||
|
@ -185,6 +191,7 @@ public class CPPASTName extends CPPASTNameBase implements ICPPASTCompletionConte
|
|||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinding[] findBindings(IASTName n, boolean isPrefix) {
|
||||
return findBindings(n, isPrefix, null);
|
||||
}
|
||||
|
|
|
@ -37,14 +37,17 @@ public class CPPASTParameterDeclaration extends ASTNode implements ICPPASTParame
|
|||
setDeclarator(declarator);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isParameterPack() {
|
||||
return fDeclarator != null && CPPVisitor.findInnermostDeclarator(fDeclarator).declaresParameterPack();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CPPASTParameterDeclaration copy() {
|
||||
return copy(CopyStyle.withoutLocations);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CPPASTParameterDeclaration copy(CopyStyle style) {
|
||||
CPPASTParameterDeclaration copy = new CPPASTParameterDeclaration();
|
||||
copy.setDeclSpecifier(fDeclSpec == null ? null : fDeclSpec.copy(style));
|
||||
|
@ -56,15 +59,18 @@ public class CPPASTParameterDeclaration extends ASTNode implements ICPPASTParame
|
|||
return copy;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IASTDeclSpecifier getDeclSpecifier() {
|
||||
return fDeclSpec;
|
||||
}
|
||||
|
||||
public ICPPASTDeclarator getDeclarator() {
|
||||
@Override
|
||||
public ICPPASTDeclarator getDeclarator() {
|
||||
return fDeclarator;
|
||||
}
|
||||
|
||||
public void setDeclSpecifier(IASTDeclSpecifier declSpec) {
|
||||
@Override
|
||||
public void setDeclSpecifier(IASTDeclSpecifier declSpec) {
|
||||
assertNotFrozen();
|
||||
this.fDeclSpec = declSpec;
|
||||
if (declSpec != null) {
|
||||
|
@ -73,7 +79,8 @@ public class CPPASTParameterDeclaration extends ASTNode implements ICPPASTParame
|
|||
}
|
||||
}
|
||||
|
||||
public void setDeclarator(IASTDeclarator declarator) {
|
||||
@Override
|
||||
public void setDeclarator(IASTDeclarator declarator) {
|
||||
assertNotFrozen();
|
||||
if (declarator instanceof ICPPASTDeclarator) {
|
||||
fDeclarator = (ICPPASTDeclarator) declarator;
|
||||
|
@ -85,7 +92,7 @@ public class CPPASTParameterDeclaration extends ASTNode implements ICPPASTParame
|
|||
}
|
||||
|
||||
@Override
|
||||
public boolean accept( ASTVisitor action ){
|
||||
public boolean accept(ASTVisitor action) {
|
||||
if (action.shouldVisitParameterDeclarations) {
|
||||
switch (action.visit((IASTParameterDeclaration) this)) {
|
||||
case ASTVisitor.PROCESS_ABORT: return false;
|
||||
|
@ -105,7 +112,8 @@ public class CPPASTParameterDeclaration extends ASTNode implements ICPPASTParame
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void replace(IASTNode child, IASTNode other) {
|
||||
if (child == fDeclarator) {
|
||||
other.setPropertyInParent(child.getPropertyInParent());
|
||||
|
|
Loading…
Add table
Reference in a new issue