1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-07-10 12:10:48 -07:00
parent 5e5d6a0505
commit 1c96bfa1b2
21 changed files with 38 additions and 62 deletions

View file

@ -6,11 +6,10 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* IBM - Initial API and implementation * IBM - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp; package org.eclipse.cdt.core.dom.ast.cpp;
/** /**
* Base interface for methods, also used for constructors. * Base interface for methods, also used for constructors.
* *
@ -18,7 +17,7 @@ package org.eclipse.cdt.core.dom.ast.cpp;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPMethod extends ICPPFunction, ICPPMember { public interface ICPPMethod extends ICPPFunction, ICPPMember {
public static final ICPPMethod [] EMPTY_CPPMETHOD_ARRAY = new ICPPMethod[0]; public static final ICPPMethod[] EMPTY_CPPMETHOD_ARRAY = {};
/** /**
* Returns whether this method is declared to be virtual. Does not detect whether * Returns whether this method is declared to be virtual. Does not detect whether
@ -27,9 +26,9 @@ public interface ICPPMethod extends ICPPFunction, ICPPMember {
public boolean isVirtual(); public boolean isVirtual();
/** /**
* is this a destructor * Is this a destructor?
* *
* returns true if its name starts with '~' * Returns true if its name starts with '~'
*/ */
public boolean isDestructor(); public boolean isDestructor();

View file

@ -21,12 +21,12 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
*/ */
public interface ICPPNamespace extends ICPPBinding { public interface ICPPNamespace extends ICPPBinding {
/** /**
* get the scope object associated with this namespace * Returns the scope object associated with this namespace
*/ */
public ICPPNamespaceScope getNamespaceScope(); public ICPPNamespaceScope getNamespaceScope();
/** /**
* get an array of the all the bindings declared in this namespace. * Returns an array of the all the bindings declared in this namespace.
*/ */
public IBinding[] getMemberBindings(); public IBinding[] getMemberBindings();

View file

@ -17,10 +17,8 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPNamespaceAlias extends ICPPNamespace { public interface ICPPNamespaceAlias extends ICPPNamespace {
/** /**
* get the binding of the original namespace. * Returns the binding of the original namespace.
*/ */
public IBinding getBinding(); public IBinding getBinding();
} }

View file

@ -11,7 +11,6 @@
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp; package org.eclipse.cdt.core.dom.ast.cpp;
/** /**
* A namespace scope is either a block-scope or a namespace-scope or global scope. * A namespace scope is either a block-scope or a namespace-scope or global scope.
* *
@ -19,7 +18,6 @@ package org.eclipse.cdt.core.dom.ast.cpp;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPNamespaceScope extends ICPPScope { public interface ICPPNamespaceScope extends ICPPScope {
/** /**
* @since 5.3 * @since 5.3
*/ */

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Andrew Niefer (IBM) - Initial API and implementation * Andrew Niefer (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.IParameter;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPParameter extends IParameter, ICPPVariable { public interface ICPPParameter extends IParameter, ICPPVariable {
/** /**
* @since 5.2 * @since 5.2
*/ */

View file

@ -21,7 +21,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
* @since 5.2 * @since 5.2
*/ */
public interface ICPPParameterPackType extends IType { public interface ICPPParameterPackType extends IType {
/** /**
* Returns the pattern for the pack-expansion * Returns the pattern for the pack-expansion
*/ */

View file

@ -18,7 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPReferenceType extends IType { public interface ICPPReferenceType extends IType {
/** /**
* Returns the type that this is a reference of * Returns the type that this is a reference of
*/ */

View file

@ -17,5 +17,4 @@ import org.eclipse.cdt.core.dom.ast.IScope;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPScope extends IScope { public interface ICPPScope extends IScope {
} }

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Andrew Niefer (IBM) - Initial API and implementation * Andrew Niefer (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;

View file

@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Markus Schorn - initial API and implementation * Markus Schorn - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp; package org.eclipse.cdt.core.dom.ast.cpp;

View file

@ -6,12 +6,11 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* IBM - Initial API and implementation * 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;
/** /**
* Base interface for all template definitions including explicit (partial) specializations. * Base interface for all template definitions including explicit (partial) specializations.
* *
@ -19,7 +18,6 @@ package org.eclipse.cdt.core.dom.ast.cpp;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPTemplateDefinition extends ICPPBinding { public interface ICPPTemplateDefinition extends ICPPBinding {
/** /**
* Returns an array of the template parameters. * Returns an array of the template parameters.
* In the case of a specialization, the array will be empty, * In the case of a specialization, the array will be empty,

View file

@ -1,15 +1,14 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2010 IBM Corporation and others. * Copyright (c) 2005, 2010 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:
* IBM - Initial API and implementation * 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;
import org.eclipse.cdt.core.dom.ast.IType; import org.eclipse.cdt.core.dom.ast.IType;

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Doug Schaefer (IBM) - Initial API and implementation * Doug Schaefer (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,7 @@ package org.eclipse.cdt.core.dom.ast.cpp;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPTemplateParameter extends ICPPBinding { public interface ICPPTemplateParameter extends ICPPBinding {
public static final ICPPTemplateParameter[] EMPTY_TEMPLATE_PARAMETER_ARRAY = new ICPPTemplateParameter[0]; public static final ICPPTemplateParameter[] EMPTY_TEMPLATE_PARAMETER_ARRAY = {};
/** /**
* Returns the zero-based position of this parameter within the template parameter list it belongs to. * Returns the zero-based position of this parameter within the template parameter list it belongs to.

View file

@ -6,11 +6,10 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Markus Schorn - initial API and implementation * Markus Schorn - initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp; package org.eclipse.cdt.core.dom.ast.cpp;
/** /**
* Models the mapping of template parameters to values, or pack-expansions. * Models the mapping of template parameters to values, or pack-expansions.
* *
@ -19,7 +18,6 @@ package org.eclipse.cdt.core.dom.ast.cpp;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPTemplateParameterMap { public interface ICPPTemplateParameterMap {
/** /**
* Returns the value for the template parameter with the given id. * Returns the value for the template parameter with the given id.
* @see ICPPTemplateParameter#getParameterID() * @see ICPPTemplateParameter#getParameterID()
@ -32,7 +30,6 @@ public interface ICPPTemplateParameterMap {
*/ */
public ICPPTemplateArgument getArgument(ICPPTemplateParameter param); public ICPPTemplateArgument getArgument(ICPPTemplateParameter param);
/** /**
* Returns the values for the template parameter pack with the given id in the map, * Returns the values for the template parameter pack with the given id in the map,
* or <code>null</code> if the parameter is not mapped or is not a parameter pack. * or <code>null</code> if the parameter is not mapped or is not a parameter pack.

View file

@ -6,8 +6,8 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* IBM - Initial API and implementation * 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;

View file

@ -20,7 +20,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPTemplateTemplateParameter extends ICPPTemplateParameter, ICPPClassTemplate { public interface ICPPTemplateTemplateParameter extends ICPPTemplateParameter, ICPPClassTemplate {
@Override @Override
public ICPPTemplateParameter[] getTemplateParameters(); public ICPPTemplateParameter[] getTemplateParameters();

View file

@ -6,7 +6,7 @@
* http://www.eclipse.org/legal/epl-v10.html * http://www.eclipse.org/legal/epl-v10.html
* *
* Contributors: * Contributors:
* Doug Schaefer (IBM) - Initial API and implementation * Doug Schaefer (IBM) - Initial API and implementation
*******************************************************************************/ *******************************************************************************/
package org.eclipse.cdt.core.dom.ast.cpp; package org.eclipse.cdt.core.dom.ast.cpp;
@ -18,17 +18,15 @@ import org.eclipse.cdt.core.dom.ast.IType;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPTemplateTypeParameter extends ICPPTemplateParameter, IType { public interface ICPPTemplateTypeParameter extends ICPPTemplateParameter, IType {
/** /**
* The default type for this parameter. May be null * The default type for this parameter. May be {@code null}.
*
*/ */
public IType getDefault() throws DOMException; public IType getDefault() throws DOMException;
/** /**
* Types containing template parameters need to be compared even before it is known to which * Types containing template parameters need to be compared even before it is known to which
* binding the template parameter belongs to. Therefore {@link #isSameType(IType)} compares the * binding the template parameter belongs to. Therefore {@link #isSameType(IType)} compares
* kind and the parameter position of the template parameter, only. The name and the owner * the kind and the parameter position of the template parameter, only. The name and the owner
* is ignored. * is ignored.
* *
* @since 5.1 * @since 5.1

View file

@ -23,7 +23,6 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPUsingDeclaration extends ICPPBinding { public interface ICPPUsingDeclaration extends ICPPBinding {
/** /**
* Return an array of bindings that were declared by this using declaration. * Return an array of bindings that were declared by this using declaration.
* Each of these bindings delegates to some previously declared binding to which it * Each of these bindings delegates to some previously declared binding to which it

View file

@ -23,7 +23,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPUsingDirective { public interface ICPPUsingDirective {
ICPPUsingDirective[] EMPTY_ARRAY = new ICPPUsingDirective[0]; ICPPUsingDirective[] EMPTY_ARRAY = {};
/** /**
* Returns the scope of the namespace that is nominated by this * Returns the scope of the namespace that is nominated by this

View file

@ -18,7 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IVariable;
* @noimplement This interface is not intended to be implemented by clients. * @noimplement This interface is not intended to be implemented by clients.
*/ */
public interface ICPPVariable extends IVariable, ICPPBinding { public interface ICPPVariable extends IVariable, ICPPBinding {
/** /**
* does this variable have the mutable storage class specifier * does this variable have the mutable storage class specifier
*/ */

View file

@ -59,13 +59,9 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
@Override @Override
public CPPASTLiteralExpression copy(CopyStyle style) { public CPPASTLiteralExpression copy(CopyStyle style) {
CPPASTLiteralExpression copy = new CPPASTLiteralExpression(kind, CPPASTLiteralExpression copy =
value == null ? null : value.clone()); new CPPASTLiteralExpression(kind, value == null ? null : value.clone());
copy.setOffsetAndLength(this); return copy(copy, style);
if (style == CopyStyle.withLocations) {
copy.setCopyLocation(this);
}
return copy;
} }
@Override @Override
@ -250,7 +246,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
case lk_float_constant: case lk_float_constant:
return new EvalFixed(classifyTypeOfFloatLiteral(), PRVALUE, Value.UNKNOWN); return new EvalFixed(classifyTypeOfFloatLiteral(), PRVALUE, Value.UNKNOWN);
case lk_integer_constant: case lk_integer_constant:
return new EvalFixed(classifyTypeOfIntLiteral(),PRVALUE, createIntValue()); return new EvalFixed(classifyTypeOfIntLiteral(), PRVALUE, createIntValue());
case lk_string_literal: case lk_string_literal:
IType type = new CPPBasicType(getCharType(), 0, this); IType type = new CPPBasicType(getCharType(), 0, this);
type = new CPPQualifierType(type, true, false); type = new CPPQualifierType(type, true, false);