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