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;
|
import org.eclipse.core.runtime.PlatformObject;
|
||||||
|
|
||||||
public class CPPCompositeBinding extends PlatformObject implements IBinding {
|
public class CPPCompositeBinding extends PlatformObject implements IBinding {
|
||||||
|
IBinding[] bindings;
|
||||||
IBinding [] bindings = null;
|
|
||||||
|
|
||||||
public CPPCompositeBinding(IBinding[] bindingList) {
|
public CPPCompositeBinding(IBinding[] bindingList) {
|
||||||
bindings = (IBinding[]) ArrayUtil.trim(IBinding.class, bindingList, true);
|
bindings = (IBinding[]) ArrayUtil.trim(IBinding.class, bindingList, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
@Override
|
||||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getName()
|
|
||||||
*/
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return bindings[0].getName();
|
return bindings[0].getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
@Override
|
||||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getNameCharArray()
|
|
||||||
*/
|
|
||||||
public char[] getNameCharArray() {
|
public char[] getNameCharArray() {
|
||||||
return bindings[0].getNameCharArray();
|
return bindings[0].getNameCharArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
@Override
|
||||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getScope()
|
|
||||||
*/
|
|
||||||
public IScope getScope() throws DOMException {
|
public IScope getScope() throws DOMException {
|
||||||
return bindings[0].getScope();
|
return bindings[0].getScope();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IBinding getOwner() {
|
public IBinding getOwner() {
|
||||||
return bindings[0].getOwner();
|
return bindings[0].getOwner();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.IBinding#getPhysicalNode()
|
|
||||||
*/
|
|
||||||
public IASTNode getPhysicalNode() {
|
public IASTNode getPhysicalNode() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* (non-Javadoc)
|
|
||||||
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPCompositeBinding#getBindings()
|
|
||||||
*/
|
|
||||||
public IBinding[] getBindings() {
|
public IBinding[] getBindings() {
|
||||||
return bindings;
|
return bindings;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public ILinkage getLinkage() {
|
public ILinkage getLinkage() {
|
||||||
return Linkage.CPP_LINKAGE;
|
return Linkage.CPP_LINKAGE;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ public abstract class CompositeScope implements IIndexScope {
|
||||||
this.rbinding = rbinding;
|
this.rbinding = rbinding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IIndexScope getParent() {
|
public IIndexScope getParent() {
|
||||||
IIndexScope rscope = rbinding.getScope();
|
IIndexScope rscope = rbinding.getScope();
|
||||||
if (rscope != null) {
|
if (rscope != null) {
|
||||||
|
@ -52,6 +53,7 @@ public abstract class CompositeScope implements IIndexScope {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public IIndexName getScopeName() {
|
public IIndexName getScopeName() {
|
||||||
if (rbinding instanceof IIndexScope)
|
if (rbinding instanceof IIndexScope)
|
||||||
return ((IIndexScope) rbinding).getScopeName();
|
return ((IIndexScope) rbinding).getScopeName();
|
||||||
|
@ -112,19 +114,21 @@ public abstract class CompositeScope implements IIndexScope {
|
||||||
return IBinding.EMPTY_BINDING_ARRAY;
|
return IBinding.EMPTY_BINDING_ARRAY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final IBinding getBinding(IASTName name, boolean resolve) {
|
public final IBinding getBinding(IASTName name, boolean resolve) {
|
||||||
return getBinding(name, resolve, IIndexFileSet.EMPTY);
|
return getBinding(name, resolve, IIndexFileSet.EMPTY);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public final IBinding[] getBindings(IASTName name, boolean resolve, boolean prefix) {
|
public final IBinding[] getBindings(IASTName name, boolean resolve, boolean prefix) {
|
||||||
return getBindings(name, resolve, prefix, IIndexFileSet.EMPTY);
|
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
|
* The c++-name resolution stores scopes in hash-maps, we need to make sure equality is detected
|
||||||
* in order to prevent infinite loops.
|
* in order to prevent infinite loops.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public final boolean equals(Object other) {
|
public final boolean equals(Object other) {
|
||||||
if (other instanceof CompositeScope) {
|
if (other instanceof CompositeScope) {
|
||||||
return rbinding.equals(((CompositeScope)other).rbinding);
|
return rbinding.equals(((CompositeScope)other).rbinding);
|
||||||
|
@ -132,11 +136,11 @@ public abstract class CompositeScope implements IIndexScope {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
/**
|
/**
|
||||||
* The c++-name resolution stores scopes in hash-maps, we need to make sure equality is detected
|
* The c++-name resolution stores scopes in hash-maps, we need to make sure equality is detected
|
||||||
* in order to prevent infinite loops.
|
* in order to prevent infinite loops.
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public final int hashCode() {
|
public final int hashCode() {
|
||||||
return rbinding.hashCode();
|
return rbinding.hashCode();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue