mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
5e5d6a0505
commit
1c96bfa1b2
21 changed files with 38 additions and 62 deletions
|
@ -6,11 +6,10 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM - Initial API and implementation
|
||||
* IBM - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
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
|
||||
|
@ -27,9 +26,9 @@ public interface ICPPMethod extends ICPPFunction, ICPPMember {
|
|||
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();
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
|
|||
*/
|
||||
public interface ICPPNamespace extends ICPPBinding {
|
||||
/**
|
||||
* get the scope object associated with this namespace
|
||||
* Returns the scope object associated with this namespace
|
||||
*/
|
||||
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();
|
||||
|
||||
|
|
|
@ -17,10 +17,8 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPNamespaceAlias extends ICPPNamespace {
|
||||
|
||||
/**
|
||||
* get the binding of the original namespace.
|
||||
* Returns the binding of the original namespace.
|
||||
*/
|
||||
public IBinding getBinding();
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public interface ICPPNamespaceScope extends ICPPScope {
|
||||
|
||||
/**
|
||||
* @since 5.3
|
||||
*/
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Andrew Niefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Andrew Niefer (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.IParameter;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPParameter extends IParameter, ICPPVariable {
|
||||
|
||||
/**
|
||||
* @since 5.2
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
|||
* @since 5.2
|
||||
*/
|
||||
public interface ICPPParameterPackType extends IType {
|
||||
|
||||
/**
|
||||
* Returns the pattern for the pack-expansion
|
||||
*/
|
||||
|
|
|
@ -18,7 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPReferenceType extends IType {
|
||||
|
||||
/**
|
||||
* Returns the type that this is a reference of
|
||||
*/
|
||||
|
|
|
@ -17,5 +17,4 @@ import org.eclipse.cdt.core.dom.ast.IScope;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPScope extends IScope {
|
||||
|
||||
}
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Andrew Niefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Andrew Niefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Markus Schorn - initial API and implementation
|
||||
* Markus Schorn - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
|
|
@ -6,12 +6,11 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* IBM - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public interface ICPPTemplateDefinition extends ICPPBinding {
|
||||
|
||||
/**
|
||||
* Returns an array of the template parameters.
|
||||
* In the case of a specialization, the array will be empty,
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2010 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
* Copyright (c) 2005, 2010 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Contributors:
|
||||
* IBM - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
import org.eclipse.cdt.core.dom.ast.IType;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
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.
|
||||
*/
|
||||
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.
|
||||
|
|
|
@ -6,11 +6,10 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Markus Schorn - initial API and implementation
|
||||
* Markus Schorn - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
public interface ICPPTemplateParameterMap {
|
||||
|
||||
/**
|
||||
* Returns the value for the template parameter with the given id.
|
||||
* @see ICPPTemplateParameter#getParameterID()
|
||||
|
@ -32,7 +30,6 @@ public interface ICPPTemplateParameterMap {
|
|||
*/
|
||||
public ICPPTemplateArgument getArgument(ICPPTemplateParameter param);
|
||||
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
* IBM - Initial API and implementation
|
||||
* Markus Schorn (Wind River Systems)
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.dom.ast.cpp;
|
||||
|
||||
|
|
|
@ -20,7 +20,6 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPTemplateTemplateParameter extends ICPPTemplateParameter, ICPPClassTemplate {
|
||||
|
||||
@Override
|
||||
public ICPPTemplateParameter[] getTemplateParameters();
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
* Doug Schaefer (IBM) - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
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.
|
||||
*/
|
||||
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;
|
||||
|
||||
/**
|
||||
* 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
|
||||
* kind and the parameter position of the template parameter, only. The name and the owner
|
||||
* binding the template parameter belongs to. Therefore {@link #isSameType(IType)} compares
|
||||
* the kind and the parameter position of the template parameter, only. The name and the owner
|
||||
* is ignored.
|
||||
*
|
||||
* @since 5.1
|
||||
|
|
|
@ -22,8 +22,7 @@ import org.eclipse.cdt.core.dom.ast.IBinding;
|
|||
* @noextend This interface is not intended to be extended 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.
|
||||
* Each of these bindings delegates to some previously declared binding to which it
|
||||
|
|
|
@ -23,7 +23,7 @@ import org.eclipse.cdt.internal.core.dom.parser.ASTNode;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPUsingDirective {
|
||||
ICPPUsingDirective[] EMPTY_ARRAY = new ICPPUsingDirective[0];
|
||||
ICPPUsingDirective[] EMPTY_ARRAY = {};
|
||||
|
||||
/**
|
||||
* Returns the scope of the namespace that is nominated by this
|
||||
|
|
|
@ -18,7 +18,6 @@ import org.eclipse.cdt.core.dom.ast.IVariable;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPVariable extends IVariable, ICPPBinding {
|
||||
|
||||
/**
|
||||
* does this variable have the mutable storage class specifier
|
||||
*/
|
||||
|
|
|
@ -59,13 +59,9 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
|
|||
|
||||
@Override
|
||||
public CPPASTLiteralExpression copy(CopyStyle style) {
|
||||
CPPASTLiteralExpression copy = new CPPASTLiteralExpression(kind,
|
||||
value == null ? null : value.clone());
|
||||
copy.setOffsetAndLength(this);
|
||||
if (style == CopyStyle.withLocations) {
|
||||
copy.setCopyLocation(this);
|
||||
}
|
||||
return copy;
|
||||
CPPASTLiteralExpression copy =
|
||||
new CPPASTLiteralExpression(kind, value == null ? null : value.clone());
|
||||
return copy(copy, style);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -250,7 +246,7 @@ public class CPPASTLiteralExpression extends ASTNode implements ICPPASTLiteralEx
|
|||
case lk_float_constant:
|
||||
return new EvalFixed(classifyTypeOfFloatLiteral(), PRVALUE, Value.UNKNOWN);
|
||||
case lk_integer_constant:
|
||||
return new EvalFixed(classifyTypeOfIntLiteral(),PRVALUE, createIntValue());
|
||||
return new EvalFixed(classifyTypeOfIntLiteral(), PRVALUE, createIntValue());
|
||||
case lk_string_literal:
|
||||
IType type = new CPPBasicType(getCharType(), 0, this);
|
||||
type = new CPPQualifierType(type, true, false);
|
||||
|
|
Loading…
Add table
Reference in a new issue