本文整理汇总了Java中com.intellij.util.cls.ClsUtil.isProtected方法的典型用法代码示例。如果您正苦于以下问题:Java ClsUtil.isProtected方法的具体用法?Java ClsUtil.isProtected怎么用?Java ClsUtil.isProtected使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.util.cls.ClsUtil
的用法示例。
在下文中一共展示了ClsUtil.isProtected方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isMoreAccessible
import com.intellij.util.cls.ClsUtil; //导入方法依赖的package包/类
/**
* tests if the accessibility, denoted by flags1 is less restricted than the accessibility denoted by flags2
*
* @return true means flags1 is less restricted than flags2 <br>
* false means flags1 define more restricted access than flags2 or they have equal accessibility
*/
public static boolean isMoreAccessible(int flags1, int flags2)
{
if(ClsUtil.isPrivate(flags2))
{
return ClsUtil.isPackageLocal(flags1) || ClsUtil.isProtected(flags1) || ClsUtil.isPublic(flags1);
}
if(ClsUtil.isPackageLocal(flags2))
{
return ClsUtil.isProtected(flags1) || ClsUtil.isPublic(flags1);
}
if(ClsUtil.isProtected(flags2))
{
return ClsUtil.isPublic(flags1);
}
return false;
}
示例2: isMoreAccessible
import com.intellij.util.cls.ClsUtil; //导入方法依赖的package包/类
/**
* tests if the accessibility, denoted by flags1 is less restricted than the accessibility denoted by flags2
* @return true means flags1 is less restricted than flags2 <br>
* false means flags1 define more restricted access than flags2 or they have equal accessibility
*/
public static boolean isMoreAccessible(int flags1, int flags2) {
if (ClsUtil.isPrivate(flags2)) {
return ClsUtil.isPackageLocal(flags1) || ClsUtil.isProtected(flags1) || ClsUtil.isPublic(flags1);
}
if (ClsUtil.isPackageLocal(flags2)) {
return ClsUtil.isProtected(flags1) || ClsUtil.isPublic(flags1);
}
if (ClsUtil.isProtected(flags2)) {
return ClsUtil.isPublic(flags1);
}
return false;
}
示例3: isProtected
import com.intellij.util.cls.ClsUtil; //导入方法依赖的package包/类
public boolean isProtected() {
return ClsUtil.isProtected(myFlags);
}