mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
@Override annotations.
This commit is contained in:
parent
8ab95e93b5
commit
28699d05bb
2 changed files with 30 additions and 38 deletions
|
@ -21,54 +21,42 @@ import org.eclipse.cdt.internal.core.dom.Linkage;
|
|||
import org.eclipse.core.runtime.PlatformObject;
|
||||
|
||||
public class CPPCompositeBinding extends PlatformObject implements IBinding {
|
||||
|
||||
IBinding [] bindings = null;
|
||||
IBinding[] bindings;
|
||||
|
||||
public CPPCompositeBinding(IBinding[] bindingList) {
|
||||
bindings = (IBinding[]) ArrayUtil.trim(IBinding.class, bindingList, true);
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
|
||||
*/
|
||||
@Override
|
||||
public String getName() {
|
||||
return bindings[0].getName();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
|
||||
*/
|
||||
@Override
|
||||
public char[] getNameCharArray() {
|
||||
return bindings[0].getNameCharArray();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
|
||||
*/
|
||||
@Override
|
||||
public IScope getScope() throws DOMException {
|
||||
return bindings[0].getScope();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBinding getOwner() {
|
||||
return bindings[0].getOwner();
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getPhysicalNode()
|
||||
*/
|
||||
public IASTNode getPhysicalNode() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPCompositeBinding#getBindings()
|
||||
*/
|
||||
public IBinding[] getBindings() {
|
||||
return bindings;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ILinkage getLinkage() {
|
||||
return Linkage.CPP_LINKAGE;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@ public abstract class CompositeScope implements IIndexScope {
|
|||
this.rbinding = rbinding;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIndexScope getParent() {
|
||||
IIndexScope rscope = rbinding.getScope();
|
||||
if (rscope != null) {
|
||||
|
@ -52,6 +53,7 @@ public abstract class CompositeScope implements IIndexScope {
|
|||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIndexName getScopeName() {
|
||||
if (rbinding instanceof IIndexScope)
|
||||
return ((IIndexScope) rbinding).getScopeName();
|
||||
|
@ -112,19 +114,21 @@ public abstract class CompositeScope implements IIndexScope {
|
|||
return IBinding.EMPTY_BINDING_ARRAY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final IBinding getBinding(IASTName name, boolean resolve) {
|
||||
return getBinding(name, resolve, IIndexFileSet.EMPTY);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final IBinding[] getBindings(IASTName name, boolean resolve, boolean prefix) {
|
||||
return getBindings(name, resolve, prefix, IIndexFileSet.EMPTY);
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* The c++-name resolution stores scopes in hash-maps, we need to make sure equality is detected
|
||||
* in order to prevent infinite loops.
|
||||
*/
|
||||
@Override
|
||||
public final boolean equals(Object other) {
|
||||
if (other instanceof CompositeScope) {
|
||||
return rbinding.equals(((CompositeScope)other).rbinding);
|
||||
|
@ -132,11 +136,11 @@ public abstract class CompositeScope implements IIndexScope {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
/**
|
||||
* The c++-name resolution stores scopes in hash-maps, we need to make sure equality is detected
|
||||
* in order to prevent infinite loops.
|
||||
*/
|
||||
@Override
|
||||
public final int hashCode() {
|
||||
return rbinding.hashCode();
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue