mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-07 09:46:02 +02:00
Cosmetics.
This commit is contained in:
parent
4c34ced31b
commit
fab1e9757c
4 changed files with 21 additions and 26 deletions
|
@ -16,6 +16,9 @@ package org.eclipse.cdt.core.dom.ast.cpp;
|
|||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
*/
|
||||
public interface ICPPClassTemplate extends ICPPTemplateDefinition, ICPPClassType {
|
||||
/**
|
||||
* Returns the partial specializations of this class template.
|
||||
*/
|
||||
public ICPPClassTemplatePartialSpecialization[] getPartialSpecializations();
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,8 +19,8 @@ import org.eclipse.cdt.core.dom.ast.IType;
|
|||
* a class template in its own right.
|
||||
*
|
||||
* e.g.:
|
||||
* 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 {}; // the primary class template
|
||||
* template <class T> class A<T*> {}; // a partial specialization of the primary class template
|
||||
*
|
||||
* @noextend This interface is not intended to be extended by clients.
|
||||
* @noimplement This interface is not intended to be implemented by clients.
|
||||
|
@ -33,7 +33,6 @@ public interface ICPPClassTemplatePartialSpecialization extends ICPPClassTemplat
|
|||
*/
|
||||
public ICPPClassTemplate getPrimaryClassTemplate();
|
||||
|
||||
|
||||
/**
|
||||
* Returns the arguments of this partial specialization.
|
||||
* @since 5.1
|
||||
|
@ -44,5 +43,5 @@ public interface ICPPClassTemplatePartialSpecialization extends ICPPClassTemplat
|
|||
* @deprecated use {@link #getTemplateArguments()}, instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public IType [] getArguments() throws DOMException;
|
||||
public IType[] getArguments() throws DOMException;
|
||||
}
|
||||
|
|
|
@ -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.internal.core.dom.parser.cpp;
|
||||
|
||||
|
@ -28,7 +28,6 @@ import org.eclipse.cdt.internal.core.dom.parser.cpp.semantics.CPPTemplates;
|
|||
*/
|
||||
public class CPPClassTemplatePartialSpecialization extends CPPClassTemplate
|
||||
implements ICPPClassTemplatePartialSpecialization {
|
||||
|
||||
private final ICPPTemplateArgument[] arguments;
|
||||
|
||||
public CPPClassTemplatePartialSpecialization(ICPPASTTemplateId name, ICPPTemplateArgument[] arguments) {
|
||||
|
@ -41,29 +40,12 @@ public class CPPClassTemplatePartialSpecialization extends CPPClassTemplate
|
|||
return arguments;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPClassTemplatePartialSpecialization#getPrimaryClassTemplate()
|
||||
*/
|
||||
@Override
|
||||
public ICPPClassTemplate getPrimaryClassTemplate() {
|
||||
ICPPASTTemplateId id = (ICPPASTTemplateId) getTemplateName();
|
||||
return (ICPPClassTemplate) id.getTemplateName().resolveBinding();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + ASTTypeUtil.getArgumentListString(getTemplateArguments(), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public IType[] getArguments() throws DOMException {
|
||||
return CPPTemplates.getArguments(getTemplateArguments());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.IType#isSameType(org.eclipse.cdt.core.dom.ast.IType)
|
||||
*/
|
||||
@Override
|
||||
public boolean isSameType(IType type) {
|
||||
if (type == this)
|
||||
|
@ -96,4 +78,15 @@ public class CPPClassTemplatePartialSpecialization extends CPPClassTemplate
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return super.toString() + ASTTypeUtil.getArgumentListString(getTemplateArguments(), true);
|
||||
}
|
||||
|
||||
@Override
|
||||
@Deprecated
|
||||
public IType[] getArguments() throws DOMException {
|
||||
return CPPTemplates.getArguments(getTemplateArguments());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -133,7 +133,7 @@ public final class ChunkCache {
|
|||
}
|
||||
|
||||
private int computeLength(long maxSize) {
|
||||
long maxLength= Math.min(maxSize/Database.CHUNK_SIZE, Integer.MAX_VALUE);
|
||||
return Math.max(1, (int)maxLength);
|
||||
long maxLength= Math.min(maxSize / Database.CHUNK_SIZE, Integer.MAX_VALUE);
|
||||
return Math.max(1, (int) maxLength);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue