本文整理匯總了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);
}