org.apache.bcel.classfile.Method.isProtected()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(86)

本文整理了Java中org.apache.bcel.classfile.Method.isProtected()方法的一些代码示例,展示了Method.isProtected()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Method.isProtected()方法的具体详情如下:
包路径:org.apache.bcel.classfile.Method
类名称:Method
方法名:isProtected

Method.isProtected介绍

暂无

代码示例

代码示例来源:origin: spotbugs/spotbugs

@Override
public void visit(Method obj) {
  if (DEBUG) {
    System.out.println("Checking " + getClassName() + "." + obj.getName());
  }
  if (Const.CONSTRUCTOR_NAME.equals(getMethodName()) && (obj.isPublic() || obj.isProtected())) {
    publicOrProtectedConstructor = true;
  }
  pendingGetField = null;
  saState = 0;
  super.visit(obj);
  int flags = obj.getAccessFlags();
  if ((flags & Const.ACC_NATIVE) != 0) {
    hasNativeMethods = true;
  }
}

代码示例来源:origin: spotbugs/spotbugs

@Override
public void visit(Code obj) {
  if (Const.CONSTRUCTOR_NAME.equals(getMethodName()) && (getMethod().isPublic() || getMethod().isProtected())) {
    super.visit(obj);
    bugAccumulator.reportAccumulatedBugs();
  }
}

代码示例来源:origin: spotbugs/spotbugs

@Override
public void visit(Code obj) {
  if (!getMethod().isPublic() && !getMethod().isProtected()) {
    return;

代码示例来源:origin: spotbugs/spotbugs

|| getMethod().isProtected()
  && !samePackage(getDottedClassName(), superclassName)) {
return;

代码示例来源:origin: spotbugs/spotbugs

&& (obj.isPublic() || obj.isProtected()) && !hasBadMethodNames ? NORMAL_PRIORITY : LOW_PRIORITY)
.addClassAndMethod(this));

代码示例来源:origin: spotbugs/spotbugs

if (method.isPublic()) {
  priority = NORMAL_PRIORITY;
} else if (method.isProtected() || isDefaultAccess) {
  priority = NORMAL_PRIORITY;

代码示例来源:origin: NativeScript/android-dts-generator

private List<FieldOrMethod> getMembers(JavaClass javaClass, List<JavaClass> interfaces) {
  Set<String> methodNames = new HashSet<>();
  ArrayList<FieldOrMethod> members = new ArrayList<>();
  List<Method> allInterfacesMethods = getAllInterfacesMethods(interfaces);
  List<Method> methods = new ArrayList<>();
  methods.addAll(Arrays.asList(javaClass.getMethods()));
  methods.addAll(allInterfacesMethods);
  for (Method m : methods) {
    if ((m.isPublic() || m.isProtected()) && !m.isSynthetic()) {
      members.add(m);
      methodNames.add(m.getName());
    }
  }
  for (Field f : javaClass.getFields()) {
    if ((f.isPublic() || f.isProtected()) && !f.isSynthetic() && !methodNames.contains(f.getName())) {
      members.add(f);
    }
  }
  return members;
}

代码示例来源:origin: com.google.code.findbugs/findbugs

@Override
public void visit(Method obj) {
  if (DEBUG) {
    System.out.println("Checking " + getClassName() + "." + obj.getName());
  }
  if ("<init>".equals(getMethodName()) && (obj.isPublic() || obj.isProtected())) {
    publicOrProtectedConstructor = true;
  }
  pendingGetField = null;
  saState = 0;
  super.visit(obj);
  int flags = obj.getAccessFlags();
  if ((flags & ACC_NATIVE) != 0) {
    hasNativeMethods = true;
  }
}

代码示例来源:origin: com.google.code.findbugs/findbugs

@Override
public void visit(Code obj) {
  if ("<init>".equals(getMethodName()) && (getMethod().isPublic() || getMethod().isProtected())) {
    super.visit(obj);
    bugAccumulator.reportAccumulatedBugs();
  }
}

代码示例来源:origin: NativeScript/android-dts-generator

private void processMethod(Method m, JavaClass clazz, TypeDefinition typeDefinition, boolean isInterface, Set<String> methodsSet) {
  String name = m.getName();
  if (isPrivateGoogleApiMember(name)) return;
  if (m.isSynthetic() || (!m.isPublic() && !m.isProtected())) {
    return;
  }
  // TODO: Pete: won't generate static initializers as invalid typescript properties
  if (clazz.isInterface() && name.equals("<clinit>")) {
    return;
  }
  loadBaseMethods(clazz); //loaded in "baseMethodNames" and "baseMethods"
  String tabs = getTabs(this.indent + 1);
  cacheMethodBySignature(m); //cached in "mapNameMethod"
  //generate base method content
  if (baseMethodNames.contains(name)) {
    for (Method bm : baseMethods) {
      if (bm.getName().equals(name)) {
        String sig = getMethodFullSignature(bm);
        if (!mapNameMethod.containsKey(sig)) {
          mapNameMethod.put(sig, bm);
          methodsSet.add(generateMethodContent(clazz, typeDefinition, isInterface, tabs, bm));
        }
      }
    }
  }
  methodsSet.add(generateMethodContent(clazz, typeDefinition, isInterface, tabs, m));
}

代码示例来源:origin: NativeScript/android-dts-generator

if (!m.isSynthetic() && (m.isPublic() || m.isProtected())) {
} else {
  for (Method m : currClass.getMethods()) {
    if (!m.isSynthetic() && (m.isPublic() || m.isProtected())) {
      baseMethods.add(m);
      baseMethodNames.add(m.getName());

代码示例来源:origin: com.google.code.findbugs/findbugs

@Override
public void visit(Code obj) {
  if (!getMethod().isPublic() && !getMethod().isProtected()) {
    return;

代码示例来源:origin: com.google.code.findbugs/findbugs

|| getMethod().isProtected()
  && !samePackage(getDottedClassName(), superclassName)) {
return;

代码示例来源:origin: com.google.code.findbugs/findbugs

&& (obj.isPublic() || obj.isProtected()) && !hasBadMethodNames ? NORMAL_PRIORITY : LOW_PRIORITY)
.addClassAndMethod(this));

代码示例来源:origin: com.google.code.findbugs/findbugs

if (method.isPublic()) {
  priority = NORMAL_PRIORITY;
} else if (method.isProtected() || isDefaultAccess) {
  priority = NORMAL_PRIORITY;

代码示例来源:origin: mebigfatguy/fb-contrib

try {
  Method m = getMethod();
  if ((!m.isPublic() && !m.isProtected()) || m.isAbstract() || m.isSynthetic()) {
    return;

代码示例来源:origin: com.mebigfatguy.fb-contrib/fb-contrib

try {
  Method m = getMethod();
  if ((!m.isPublic() && !m.isProtected()) || m.isAbstract() || m.isSynthetic()) {
    return;

代码示例来源:origin: org.apache.bcel/bcel

maxone++;
if (obj.isProtected()) {
  maxone++;
        " exactly one of its ACC_PUBLIC and ACC_PRIVATE modifiers set.");
    if (obj.isProtected()
        || obj.isFinal()
        || obj.isSynchronized()
        || obj.isProtected()
        || obj.isStatic()
        || obj.isFinal()

代码示例来源:origin: bcel/bcel

int maxone=0;
if (obj.isPrivate()) maxone++;
if (obj.isProtected()) maxone++;
if (obj.isPublic()) maxone++;
if (maxone > 1){
        obj.isProtected() ||
        obj.isStatic() ||
        obj.isFinal() ||

相关文章