1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00

Use generics.

This commit is contained in:
Sergey Prigogin 2008-03-08 23:05:43 +00:00
parent 7cdbcfc0f9
commit 2d4cd87741

View file

@ -51,7 +51,6 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
super(physicalNode); super(physicalNode);
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#addBinding(org.eclipse.cdt.core.dom.ast.IBinding) * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#addBinding(org.eclipse.cdt.core.dom.ast.IBinding)
*/ */
@ -78,12 +77,12 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
*/ */
public IBinding[] find(String name) throws DOMException { public IBinding[] find(String name) throws DOMException {
char[] n = name.toCharArray(); char[] n = name.toCharArray();
List bindings = new ArrayList(); List<IBinding> bindings = new ArrayList<IBinding>();
for (int i = 0; i < labels.size(); i++) { for (int i = 0; i < labels.size(); i++) {
char[] key = labels.keyAt(i); char[] key = labels.keyAt(i);
if (CharArrayUtils.equals(key, n)) { if (CharArrayUtils.equals(key, n)) {
bindings.add(labels.get(key)); bindings.add((IBinding) labels.get(key));
} }
} }
@ -92,7 +91,7 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
bindings.add(additional[i]); bindings.add(additional[i]);
} }
return (IBinding[]) bindings.toArray(new IBinding[bindings.size()]); return bindings.toArray(new IBinding[bindings.size()]);
} }
public IScope getParent() throws DOMException { public IScope getParent() throws DOMException {
@ -120,7 +119,6 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
return CPPVisitor.getContainingScope(name); return CPPVisitor.getContainingScope(name);
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionScope#getBodyScope() * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPFunctionScope#getBodyScope()
*/ */
@ -135,7 +133,6 @@ public class CPPFunctionScope extends CPPScope implements ICPPFunctionScope {
return null; return null;
} }
/* (non-Javadoc) /* (non-Javadoc)
* @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#getScopeName() * @see org.eclipse.cdt.core.dom.ast.cpp.ICPPScope#getScopeName()
*/ */