1
0
Fork 0
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:
Sergey Prigogin 2011-11-01 16:02:00 -07:00
parent 0177053e2b
commit 9fd7f04470

View file

@ -1,13 +1,13 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2004, 2011 IBM Corporation and others. * Copyright (c) 2004, 2011 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials * All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0 * are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at * which accompanies this distribution, and is available at
* 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.internal.core.dom.parser.cpp; package org.eclipse.cdt.internal.core.dom.parser.cpp;
@ -44,10 +44,12 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
this.value = value; this.value = value;
} }
@Override
public CPPASTLiteralExpression copy() { public CPPASTLiteralExpression copy() {
return copy(CopyStyle.withoutLocations); return copy(CopyStyle.withoutLocations);
} }
@Override
public CPPASTLiteralExpression copy(CopyStyle style) { public CPPASTLiteralExpression copy(CopyStyle style) {
CPPASTLiteralExpression copy = new CPPASTLiteralExpression(kind, value == null ? null CPPASTLiteralExpression copy = new CPPASTLiteralExpression(kind, value == null ? null
: value.clone()); : value.clone());
@ -58,20 +60,24 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
return copy; return copy;
} }
@Override
public int getKind() { public int getKind() {
return kind; return kind;
} }
public void setKind(int value) { @Override
public void setKind(int value) {
assertNotFrozen(); assertNotFrozen();
kind = value; kind = value;
} }
public char[] getValue() { @Override
public char[] getValue() {
return value; return value;
} }
public void setValue(char[] value) { @Override
public void setValue(char[] value) {
assertNotFrozen(); assertNotFrozen();
this.value= value; this.value= value;
} }
@ -100,7 +106,8 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
return true; return true;
} }
public IType getExpressionType() { @Override
public IType getExpressionType() {
switch (getKind()) { switch (getKind()) {
case lk_this: { case lk_this: {
IScope scope = CPPVisitor.getContainingScope(this); IScope scope = CPPVisitor.getContainingScope(this);
@ -127,10 +134,12 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION); return new ProblemType(ISemanticProblem.TYPE_UNKNOWN_FOR_EXPRESSION);
} }
@Override
public boolean isLValue() { public boolean isLValue() {
return getKind() == IASTLiteralExpression.lk_string_literal; return getKind() == IASTLiteralExpression.lk_string_literal;
} }
@Override
public ValueCategory getValueCategory() { public ValueCategory getValueCategory() {
return isLValue() ? ValueCategory.LVALUE : ValueCategory.PRVALUE; return isLValue() ? ValueCategory.LVALUE : ValueCategory.PRVALUE;
} }
@ -231,7 +240,8 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
/** /**
* @deprecated, use {@link #setValue(char[])}, instead. * @deprecated, use {@link #setValue(char[])}, instead.
*/ */
@Deprecated @Override
@Deprecated
public void setValue(String value) { public void setValue(String value) {
assertNotFrozen(); assertNotFrozen();
this.value = value.toCharArray(); this.value = value.toCharArray();