本文整理汇总了Java中org.eclipse.jdt.core.IMember.equals方法的典型用法代码示例。如果您正苦于以下问题:Java IMember.equals方法的具体用法?Java IMember.equals怎么用?Java IMember.equals使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.core.IMember
的用法示例。
在下文中一共展示了IMember.equals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: adjustMemberVisibility
import org.eclipse.jdt.core.IMember; //导入方法依赖的package包/类
/**
* Check whether anyone accesses the members of the moved type from the outside. Those may need to
* have their visibility adjusted.
*
* @param member the member
* @param monitor the progress monitor to use
* @throws JavaModelException if an error occurs
*/
private void adjustMemberVisibility(final IMember member, final IProgressMonitor monitor)
throws JavaModelException {
if (member instanceof IType) {
// recursively check accessibility of member type's members
final IJavaElement[] typeMembers = ((IType) member).getChildren();
for (int i = 0; i < typeMembers.length; i++) {
if (!(typeMembers[i] instanceof IInitializer))
adjustMemberVisibility((IMember) typeMembers[i], monitor);
}
}
if (member.equals(fReferenced) || Modifier.isPublic(member.getFlags())) return;
final SearchResultGroup[] references = findReferences(member, monitor);
for (int i = 0; i < references.length; i++) {
final SearchMatch[] searchResults = references[i].getSearchResults();
for (int k = 0; k < searchResults.length; k++) {
final IJavaElement referenceToMember = (IJavaElement) searchResults[k].getElement();
if (fAdjustments.get(member) == null
&& referenceToMember instanceof IMember
&& !isInsideMovedMember(referenceToMember)) {
// check whether the member is still visible from the
// destination. As we are moving a type, the destination is
// a package or another type.
adjustIncomingVisibility(fReferencing, member, new SubProgressMonitor(monitor, 1));
}
}
}
}