Bug 170824 - Finer grained I*Bindings
Summary: Finer grained I*Bindings
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-17 15:03 EST by Emerson Murphy-Hill CLA
Modified: 2007-01-17 15:03 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emerson Murphy-Hill CLA 2007-01-17 15:03:03 EST
I fairly frequently have some duplication like so:

IBinding binding = simpleName.resolveBinding();
if(binding instanceof IMethodBinding){					
  add(((IMethodBinding)binding).getDeclaringClass());
}else if(binding instanceof IVariableBinding){
  add(((IVariableBinding)binding).getDeclaringClass());
}

For this case, I would expect there to be a common superinterface with getDeclaringClass(), such as IMemberBinding.  I realize that local variables aren't members, so perhaps there should be ILocalVariableBindings and IMemberVariableBindings.