• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java FieldOrMethod类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



FieldOrMethod类属于org.apache.bcel.classfile包,在下文中一共展示了FieldOrMethod类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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: ignore

import org.apache.bcel.classfile.FieldOrMethod; //导入依赖的package包/类
/**
 * Determines whether a class name, and field or method should be ignored.
 * @param aClassName the class name to consider.
 * @param aFieldOrMethod  the field or method to consider.
 * @return true if aClassName, and field or method should be ignored.
 */
protected boolean ignore(String aClassName, FieldOrMethod aFieldOrMethod)
{
    final String fieldOrMethodName = aFieldOrMethod.getName();
    return (!equalScope(aFieldOrMethod)
            || mIgnoreClassNameRegexp.matcher(aClassName).matches()
        || mIgnoreNameRegexp.matcher(fieldOrMethodName).matches());
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:AbstractReferenceCheck.java


示例4: 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


示例5: getSignature

import org.apache.bcel.classfile.FieldOrMethod; //导入依赖的package包/类
/**
 * 获得范型中的类型
 * 
 * @param obj
 * @return
 */
public static String getSignature(FieldOrMethod obj) {
	for (Attribute attribute : obj.getAttributes()) {
		if (attribute instanceof Signature) {
			return ((Signature) attribute).getSignature();
		}
	}
	return obj.getSignature();
}
 
开发者ID:jdepend,项目名称:cooper,代码行数:15,代码来源:SignatureUtil.java


示例6: isSynthetic

import org.apache.bcel.classfile.FieldOrMethod; //导入依赖的package包/类
boolean isSynthetic(FieldOrMethod obj) {
    Attribute[] a = obj.getAttributes();
    for (Attribute aA : a)
        if (aA instanceof Synthetic)
            return true;
    return false;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:8,代码来源:SerializableIdiom.java


示例7: isSynthetic

import org.apache.bcel.classfile.FieldOrMethod; //导入依赖的package包/类
/**
 * Figure out if a class member (field or method) is synthetic.
 * 
 * @param member
 *            a field or method
 * @return true if the member is synthetic
 */
private boolean isSynthetic(FieldOrMethod member) {
    if (member.isSynthetic()) // this never works, but worth a try
        return true;

    String name = member.getName();

    if (name.startsWith("class$"))
        return true;

    if (name.startsWith("access$"))
        return true;

    return false;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:22,代码来源:ClassFeatureSet.java


示例8: isSynthetic

import org.apache.bcel.classfile.FieldOrMethod; //导入依赖的package包/类
/**
 * Figure out if a class member (field or method) is synthetic.
 * 
 * @param member
 *            a field or method
 * @return true if the member is synthetic
 */
private boolean isSynthetic(FieldOrMethod member) {
    if (BCELUtil.isSynthetic(member)) // this never works, but worth a try
        return true;

    String name = member.getName();

    if (name.startsWith("class$"))
        return true;

    if (name.startsWith("access$"))
        return true;

    return false;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:22,代码来源:ClassFeatureSet.java


示例9: isSynthetic

import org.apache.bcel.classfile.FieldOrMethod; //导入依赖的package包/类
public static boolean isSynthetic(FieldOrMethod m) {
    if (m.isSynthetic())
        return true;

    for(Attribute a : m.getAttributes())
        if (a instanceof Synthetic)
            return true;
    return false;
}
 
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:10,代码来源:BCELUtil.java


示例10: getFieldOrMethod

import org.apache.bcel.classfile.FieldOrMethod; //导入依赖的package包/类
/**
 * Returns the FieldOrMethod.
 * @return the FieldOrMethod.
 */
protected FieldOrMethod getFieldOrMethod()
{
    return mFieldOrMethod;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:9,代码来源:FieldOrMethodDefinition.java


示例11: isVisible

import org.apache.bcel.classfile.FieldOrMethod; //导入依赖的package包/类
private boolean isVisible(FieldOrMethod obj) {
    return (obj.getAccessFlags() & ACC_PUBLIC) != 0 || (obj.getAccessFlags() & ACC_PROTECTED) != 0;
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:4,代码来源:DontUseEnum.java


示例12: FieldOrMethodDefinition

import org.apache.bcel.classfile.FieldOrMethod; //导入依赖的package包/类
/**
 * Constructs a <code>FieldOrMethodDefinition</code> for a Field
 * or a Method.
 * @param aFieldOrMethod the Field or Method
 */
protected FieldOrMethodDefinition(FieldOrMethod aFieldOrMethod)
{
    mFieldOrMethod = aFieldOrMethod;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:10,代码来源:FieldOrMethodDefinition.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java Array类代码示例发布时间:2022-05-22
下一篇:
Java SipUri类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap