当前位置: 首页>>代码示例>>Java>>正文


Java FieldOrMethod.isPrivate方法代码示例

本文整理汇总了Java中org.apache.bcel.classfile.FieldOrMethod.isPrivate方法的典型用法代码示例。如果您正苦于以下问题:Java FieldOrMethod.isPrivate方法的具体用法?Java FieldOrMethod.isPrivate怎么用?Java FieldOrMethod.isPrivate使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.bcel.classfile.FieldOrMethod的用法示例。


在下文中一共展示了FieldOrMethod.isPrivate方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: equalScope

import org.apache.bcel.classfile.FieldOrMethod; //导入方法依赖的package包/类
/**
 * Tests whether the scope of a field or method is compatible
 * with the scope of this check. References for compatible
 * fields or methods should be checked.
 * @param aFieldOrMethod the field or method to check.
 * @return true if the scope of aFieldOrMethod is compatible
 * with the scope of this check.
 */
private boolean equalScope(FieldOrMethod aFieldOrMethod)
{
    if (aFieldOrMethod.isPrivate()) {
        return (mScope == Scope.PRIVATE);
    }
    else if (aFieldOrMethod.isProtected()) {
        return (mScope == Scope.PROTECTED);
    }
    else if (aFieldOrMethod.isPublic()) {
        return (mScope == Scope.PUBLIC);
    }
    else {
        return (mScope == Scope.PACKAGE);
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:24,代码来源:AbstractReferenceCheck.java

示例2: inScope

import org.apache.bcel.classfile.FieldOrMethod; //导入方法依赖的package包/类
/**
 * Determines whether the declared scope of a field or method is in
 * a set of scopes.
 * @param aFieldOrMethod the field or method to test.
 * @param aScopes the set of scopes to test against.
 * @return true if the declared scope of aFieldOrMethod is in aScopes.
 */
public static boolean inScope(FieldOrMethod aFieldOrMethod, Set aScopes)
{
    if (aFieldOrMethod.isPrivate()) {
        return (aScopes.contains(Scope.PRIVATE));
    }
    else if (aFieldOrMethod.isProtected()) {
        return (aScopes.contains(Scope.PROTECTED));
    }
    else if (aFieldOrMethod.isPublic()) {
        return (aScopes.contains(Scope.PUBLIC));
    }
    else {
        return (aScopes.contains(Scope.PACKAGE));
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:23,代码来源:Utils.java

示例3: BcelAccessible

import org.apache.bcel.classfile.FieldOrMethod; //导入方法依赖的package包/类
public BcelAccessible(FieldOrMethod accessible) {
	if (accessible.isPrivate()) {
		flag = AccessFlag.PRIVATE;
	}
	else if (accessible.isProtected()) {
		flag = AccessFlag.PROTECTED;
	}
	else if (accessible.isPublic()) {
		flag = AccessFlag.PUBLIC;
	}
	else {
		flag = AccessFlag.PACKAGE;
	}
}
 
开发者ID:umlet,项目名称:umlet,代码行数:15,代码来源:BcelAccessible.java


注:本文中的org.apache.bcel.classfile.FieldOrMethod.isPrivate方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。