1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 09:55:29 +02:00

Cosmetics.

Change-Id: Ie36a0936b72f053fe557b4ae6e57bf52ee4aa8f4
This commit is contained in:
Sergey Prigogin 2015-12-27 16:23:59 -08:00
parent f1bcff300c
commit 744765be6f
12 changed files with 35 additions and 32 deletions

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2005, 2010 IBM Corporation and others. * Copyright (c) 2005, 2015 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
@ -18,7 +18,7 @@ import org.eclipse.cdt.core.dom.ast.IType;
* This interface represents a class template partial specialization. A partial specialization is * This interface represents a class template partial specialization. A partial specialization is
* a class template in its own right. * a class template in its own right.
* *
* e.g.: * E.g.:
* template <class T> class A {}; // the primary class template * template <class T> class A {}; // the primary class template
* template <class T> class A<T*> {}; // a partial specialization of the primary class template * template <class T> class A<T*> {}; // a partial specialization of the primary class template
* *
@ -26,10 +26,14 @@ 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 ICPPClassTemplatePartialSpecialization extends ICPPClassTemplate { public interface ICPPClassTemplatePartialSpecialization extends ICPPClassTemplate {
public static final ICPPClassTemplatePartialSpecialization[] EMPTY_PARTIAL_SPECIALIZATION_ARRAY = {}; /** @since 5.12 */
public static final ICPPClassTemplatePartialSpecialization[] EMPTY_ARRAY = {};
/** @deprecated Use {@link #EMPTY_ARRAY} */
@Deprecated
public static final ICPPClassTemplatePartialSpecialization[] EMPTY_PARTIAL_SPECIALIZATION_ARRAY = EMPTY_ARRAY;
/** /**
* Returns the ICPPTemplateDefinition which this is a specialization of * Returns the ICPPTemplateDefinition which this is a specialization of.
*/ */
public ICPPClassTemplate getPrimaryClassTemplate(); public ICPPClassTemplate getPrimaryClassTemplate();

View file

@ -107,7 +107,7 @@ public class CPPClassTemplatePartialSpecializationSpecialization extends CPPClas
@Override @Override
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() { public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() {
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY; return ICPPClassTemplatePartialSpecialization.EMPTY_ARRAY;
} }
@Override @Override

View file

@ -202,7 +202,7 @@ public class CPPTemplateTemplateParameter extends CPPTemplateParameter
@Override @Override
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() { public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() {
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY; return ICPPClassTemplatePartialSpecialization.EMPTY_ARRAY;
} }
@Override @Override

View file

@ -51,7 +51,7 @@ public class CPPTemplateTemplateParameterSpecialization extends CPPTemplateParam
@Override @Override
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() { public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() {
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY; return ICPPClassTemplatePartialSpecialization.EMPTY_ARRAY;
} }
@Override @Override

View file

@ -49,11 +49,11 @@ public class CompositeCPPClassTemplate extends CompositeCPPClassType
} }
return ArrayUtil.addAll( return ArrayUtil.addAll(
ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY, ICPPClassTemplatePartialSpecialization.EMPTY_ARRAY,
cf.getCompositeBindings(preresult)); cf.getCompositeBindings(preresult));
} catch (CoreException ce) { } catch (CoreException ce) {
CCorePlugin.log(ce); CCorePlugin.log(ce);
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY; return ICPPClassTemplatePartialSpecialization.EMPTY_ARRAY;
} }
} }

View file

@ -32,7 +32,7 @@ public class CompositeCPPClassTemplatePartialSpecializationSpecialization extend
@Override @Override
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() { public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() {
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY; return ICPPClassTemplatePartialSpecialization.EMPTY_ARRAY;
} }
@Override @Override

View file

@ -102,7 +102,7 @@ public class CompositeCPPTemplateTemplateParameter extends CompositeCPPBinding
@Override @Override
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() { public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() {
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY; return ICPPClassTemplatePartialSpecialization.EMPTY_ARRAY;
} }
@Override @Override

View file

@ -16,12 +16,11 @@ import org.eclipse.cdt.internal.core.pdom.dom.IPDOMBinding;
import org.eclipse.core.runtime.CoreException; import org.eclipse.core.runtime.CoreException;
/** /**
* Interface for partial specializations in the pdom. * Interface for partial specializations in the PDOM.
*/ */
interface IPDOMPartialSpecialization extends ICPPClassTemplatePartialSpecialization, IPDOMBinding { interface IPDOMPartialSpecialization extends ICPPClassTemplatePartialSpecialization, IPDOMBinding {
/** /**
* Allows for setting the arguments after the binding has been added to the pdom. * Allows for setting the arguments after the binding has been added to the PDOM.
*/ */
void setArguments(ICPPTemplateArgument[] args) throws CoreException; void setArguments(ICPPTemplateArgument[] args) throws CoreException;
} }

View file

@ -226,7 +226,7 @@ public class PDOMCPPClassTemplate extends PDOMCPPClassType
return partials.toArray(new ICPPClassTemplatePartialSpecialization[partials.size()]); return partials.toArray(new ICPPClassTemplatePartialSpecialization[partials.size()]);
} catch (CoreException e) { } catch (CoreException e) {
CCorePlugin.log(e); CCorePlugin.log(e);
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY; return ICPPClassTemplatePartialSpecialization.EMPTY_ARRAY;
} }
} }

View file

@ -65,7 +65,7 @@ class PDOMCPPClassTemplatePartialSpecializationSpecialization extends PDOMCPPCla
@Override @Override
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() { public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() {
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY; return ICPPClassTemplatePartialSpecialization.EMPTY_ARRAY;
} }
public PDOMCPPClassTemplatePartialSpecializationSpecialization getNextPartial() throws CoreException { public PDOMCPPClassTemplatePartialSpecializationSpecialization getNextPartial() throws CoreException {

View file

@ -266,7 +266,7 @@ public class PDOMCPPTemplateTemplateParameter extends PDOMCPPBinding
@Override @Override
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() { public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations() {
return ICPPClassTemplatePartialSpecialization.EMPTY_PARTIAL_SPECIALIZATION_ARRAY; return ICPPClassTemplatePartialSpecialization.EMPTY_ARRAY;
} }
@Override @Override