mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-11 18:25:40 +02:00
Removed deprecated ICPPQualifiedName.getNames() method.
Change-Id: I6e84cba6c56fe5467205ef85e24035e6b2e86f50
This commit is contained in:
parent
31e3379235
commit
4b31af20b1
2 changed files with 0 additions and 30 deletions
|
@ -48,17 +48,6 @@ public interface ICPPASTQualifiedName extends ICPPASTName, IASTNameOwner {
|
||||||
*/
|
*/
|
||||||
public void setLastName(ICPPASTName name);
|
public void setLastName(ICPPASTName name);
|
||||||
|
|
||||||
/**
|
|
||||||
* @deprecated This cannot represent all qualified names in C++11,
|
|
||||||
* where the first segment of a qualifier name may be a decltype-specifier.
|
|
||||||
* Use {@link #getLastName()} and {@link #getQualifier()} instead.
|
|
||||||
* If called on a name where a segment is a decltype-specifier,
|
|
||||||
* UnsupportedOperationException is thrown.
|
|
||||||
* @noreference This method is not intended to be referenced by clients.
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public IASTName[] getNames();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns all segments of the name but the last.
|
* Returns all segments of the name but the last.
|
||||||
*
|
*
|
||||||
|
|
|
@ -169,25 +169,6 @@ public class CPPASTQualifiedName extends CPPASTNameBase
|
||||||
result[fQualifierPos + 1] = fLastName;
|
result[fQualifierPos + 1] = fLastName;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
@Deprecated
|
|
||||||
public IASTName[] getNames() {
|
|
||||||
IASTName[] result = new IASTName[fQualifierPos + (fLastName == null ? 1 : 2)];
|
|
||||||
int idx = 0;
|
|
||||||
for (ICPPASTNameSpecifier nameSpecifier : getQualifier()) {
|
|
||||||
if (nameSpecifier instanceof IASTName) {
|
|
||||||
result[idx++] = (IASTName) nameSpecifier;
|
|
||||||
} else {
|
|
||||||
throw new UnsupportedOperationException("Can't use getNames() on a " + //$NON-NLS-1$
|
|
||||||
"qualified name that includes a decltype-specifier. Use " + //$NON-NLS-1$
|
|
||||||
"getQualifier() and getLastName() instead."); //$NON-NLS-1$
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (fLastName != null)
|
|
||||||
result[fQualifierPos + 1] = fLastName;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IASTName getLastName() {
|
public IASTName getLastName() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue