本文整理汇总了Java中org.eclipse.jdt.core.IMember.getChildren方法的典型用法代码示例。如果您正苦于以下问题:Java IMember.getChildren方法的具体用法?Java IMember.getChildren怎么用?Java IMember.getChildren使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.core.IMember
的用法示例。
在下文中一共展示了IMember.getChildren方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processAnonymousInnerTypes
import org.eclipse.jdt.core.IMember; //导入方法依赖的package包/类
private void processAnonymousInnerTypes(ITypeVisitor visitor,
BinaryTypeName btn, IMember member, IProgressMonitor monitor)
throws JavaModelException {
for (final IJavaElement element : member.getChildren()) {
if (monitor.isCanceled()) {
break;
}
if (element.getElementType() == IJavaElement.TYPE) {
final IType type = (IType) element;
processType(visitor, btn.nest(type), type, monitor);
}
}
}
示例2: isEnumTypeFinal
import org.eclipse.jdt.core.IMember; //导入方法依赖的package包/类
private static boolean isEnumTypeFinal(IMember member) throws JavaModelException {
if (!(isEnum(member) && member.getElementType() == IJavaElement.TYPE)) return false;
// An enum type is implicitly final unless it contains at least one enum constant that has a
// class body.
IJavaElement[] children = member.getChildren();
for (IJavaElement child : children) {
if (isEnumConstant((IMember) child) && ((IField) child).getChildren().length != 0) {
return false;
}
}
return true;
}