本文整理汇总了Java中org.eclipse.jdt.internal.corext.util.JdtFlags.clearAccessModifiers方法的典型用法代码示例。如果您正苦于以下问题:Java JdtFlags.clearAccessModifiers方法的具体用法?Java JdtFlags.clearAccessModifiers怎么用?Java JdtFlags.clearAccessModifiers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.jdt.internal.corext.util.JdtFlags
的用法示例。
在下文中一共展示了JdtFlags.clearAccessModifiers方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getNewModifiersForCopyInSubclass
import org.eclipse.jdt.internal.corext.util.JdtFlags; //导入方法依赖的package包/类
int getNewModifiersForCopyInSubclass(int oldModifiers) throws JavaModelException {
if (isFieldInfo())
return oldModifiers;
if (isToBeDeletedFromDeclaringClass())
return oldModifiers;
int modifiers= oldModifiers;
if (isNewMethodToBeDeclaredAbstract()) {
if (!JdtFlags.isPublic(fMember))
modifiers= Modifier.PROTECTED | JdtFlags.clearAccessModifiers(modifiers);
}
return modifiers;
}
示例2: getNewModifiersForOriginal
import org.eclipse.jdt.internal.corext.util.JdtFlags; //导入方法依赖的package包/类
int getNewModifiersForOriginal(int oldModifiers) throws JavaModelException {
if (isFieldInfo())
return oldModifiers;
if (isToBeDeletedFromDeclaringClass())
return oldModifiers;
int modifiers= oldModifiers;
if (isNewMethodToBeDeclaredAbstract()) {
modifiers= JdtFlags.clearFlag(Modifier.FINAL | Modifier.NATIVE, oldModifiers);
modifiers|= Modifier.ABSTRACT;
if (!JdtFlags.isPublic(fMember))
modifiers= Modifier.PROTECTED | JdtFlags.clearAccessModifiers(modifiers);
}
return modifiers;
}
示例3: getModifiersWithUpdatedVisibility
import org.eclipse.jdt.internal.corext.util.JdtFlags; //导入方法依赖的package包/类
private int getModifiersWithUpdatedVisibility(final IMember member, final int modifiers, final Map<IMember, IncomingMemberVisibilityAdjustment> adjustments, final IProgressMonitor monitor, final boolean considerReferences, final RefactoringStatus status) throws JavaModelException {
if (needsVisibilityAdjustment(member, considerReferences, monitor, status)) {
final MemberVisibilityAdjustor.OutgoingMemberVisibilityAdjustment adjustment= new MemberVisibilityAdjustor.OutgoingMemberVisibilityAdjustment(member, Modifier.ModifierKeyword.PROTECTED_KEYWORD, RefactoringStatus.createWarningStatus(Messages.format(MemberVisibilityAdjustor.getMessage(member), new String[] { MemberVisibilityAdjustor.getLabel(member), MemberVisibilityAdjustor.getLabel(Modifier.ModifierKeyword.PROTECTED_KEYWORD)})));
adjustment.setNeedsRewriting(false);
adjustments.put(member, adjustment);
return JdtFlags.clearAccessModifiers(modifiers) | Modifier.PROTECTED;
}
if (getDestinationType().isInterface()) {
final int flags= JdtFlags.clearAccessModifiers(modifiers) | Modifier.PUBLIC;
if (member instanceof IMethod)
return JdtFlags.clearFlag(Modifier.STATIC, flags);
return flags;
}
return modifiers;
}