JDK-6402516 : need to determine if an element is accessible as a member of a given type
Type:Bug
Component:tools
Sub-Component:javac
Affected Version:5.0,6
Priority:P2
Status:Closed
Resolution:Fixed
OS:generic
CPU:generic
Submitted:2006-03-23
Updated:2017-05-16
Resolved:2006-07-01
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
Using the Tree API you can determine if a type is accessible in a given scope.
We need an additional method to determine if an element is accessible as a member of a type in a given scope.
Comments
EVALUATION
Will be best to move the existing isAccessible(TypeElement type) from Scope to the utility Types class and add a new method there:
public abstract boolean isAccessible(Scope scope,
javax.lang.model.element.Element member,
javax.lang.model.type.DeclaredType type)