org.apache.bcel.generic.NEW.getLoadClassType()方法的使用及代码示例

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

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

NEW.getLoadClassType介绍

暂无

代码示例

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

public static boolean isNullCheck(InstructionHandle h, ConstantPoolGen cpg) {
  if (!(h.getInstruction() instanceof IFNONNULL)) {
    return false;
  }
  h = h.getNext();
  final Instruction newInstruction = h.getInstruction();
  if (!(newInstruction instanceof NEW)) {
    return false;
  }
  final ObjectType loadClassType = ((NEW) newInstruction).getLoadClassType(cpg);
  if (!"java.lang.NullPointerException".equals(loadClassType.getClassName())) {
    return false;
  }
  h = h.getNext();
  return check(h, NULLCHECK1) || check(h, NULLCHECK2);
}

代码示例来源:origin: find-sec-bugs/find-sec-bugs

} else if (ins instanceof NEW) {
  NEW i = (NEW) ins;
  ObjectType type = i.getLoadClassType(cpg);
  System.out.println(formatName(ins) + " " + type.toString());
} else if (ins instanceof LoadInstruction) {

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

public static boolean isNullCheck(InstructionHandle h, ConstantPoolGen cpg) {
  if (!(h.getInstruction() instanceof IFNONNULL)) {
    return false;
  }
  h = h.getNext();
  final Instruction newInstruction = h.getInstruction();
  if (!(newInstruction instanceof NEW)) {
    return false;
  }
  final ObjectType loadClassType = ((NEW) newInstruction).getLoadClassType(cpg);
  if (!"java.lang.NullPointerException".equals(loadClassType.getClassName())) {
    return false;
  }
  h = h.getNext();
  return check(h, NULLCHECK1) || check(h, NULLCHECK2);
}

代码示例来源:origin: com.h3xstream.findsecbugs/findsecbugs-plugin

} else if (ins instanceof NEW) {
  NEW i = (NEW) ins;
  ObjectType type = i.getLoadClassType(cpg);
  System.out.println(formatName(ins) + " " + type.toString());
} else if (ins instanceof LoadInstruction) {

代码示例来源:origin: blackarbiter/Android_Code_Arbiter

@Override
public void visitNEW(NEW obj) {
  Taint taint = new Taint(Taint.State.SAFE);
  ObjectType type = obj.getLoadClassType(cpg);
  taint.setRealInstanceClass(type);
  if (FindSecBugsGlobalConfig.getInstance().isDebugTaintState()) {
    taint.setDebugInfo("new " + type.getClassName() + "()");
  }
  getFrame().pushValue(taint);
}

代码示例来源:origin: com.h3xstream.findsecbugs/findsecbugs-plugin

@Override
public void visitNEW(NEW obj) {
  Taint taint = new Taint(Taint.State.SAFE);
  ObjectType type = obj.getLoadClassType(cpg);
  taint.setRealInstanceClass(type);
  if (FindSecBugsGlobalConfig.getInstance().isDebugTaintState()) {
    taint.setDebugInfo("new " + type.getClassName() + "()");
  }
  getFrame().pushValue(taint);
}

代码示例来源:origin: contra/JMD

String callClass = ((NEW) handles[i].getInstruction()).getLoadClassType(cg.getConstantPool()).getClassName();

代码示例来源:origin: contra/JMD

&& GenericMethods.isNumber(handles[i + 2].getInstruction())
  && (handles[i + 3].getInstruction() instanceof NEWARRAY)) {
String newType = ((NEW) handles[i].getInstruction()).getLoadClassType(cg.getConstantPool()).toString();
type = ((NEWARRAY) handles[i + 3].getInstruction()).getType().toString();
logger.debug("Found new array conversion pattern: " + type + "->" + newType + " in " + cg.getClassName() + "." + method.getName());

相关文章