本文整理了Java中soot.options.Options.allow_phantom_refs()
方法的一些代码示例,展示了Options.allow_phantom_refs()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Options.allow_phantom_refs()
方法的具体详情如下:
包路径:soot.options.Options
类名称:Options
方法名:allow_phantom_refs
暂无
代码示例来源:origin: Sable/soot
public boolean getPhantomRefs() {
// if( !Options.v().allow_phantom_refs() ) return false;
// return allowsPhantomRefs;
return Options.v().allow_phantom_refs();
}
代码示例来源:origin: Sable/soot
private SootMethod resolve(final StringBuilder trace) {
SootMethod resolved = tryResolve(trace);
if (resolved != null) {
return resolved;
}
// when allowing phantom refs we also allow for references to
// non-existing methods;
// we simply create the methods on the fly; the method body will throw
// an appropriate error just in case the code *is* actually reached at runtime
boolean treatAsPhantomClass = Options.v().allow_phantom_refs() && !declaringClass.isInterface();
// declaring class of dynamic invocations not known at compile time, treat as
// phantom class regardless if phantom classes are enabled
treatAsPhantomClass = treatAsPhantomClass || declaringClass.getName().equals(SootClass.INVOKEDYNAMIC_DUMMY_CLASS_NAME);
if (treatAsPhantomClass) {
return createUnresolvedErrorMethod(declaringClass);
}
if (trace == null) {
ClassResolutionFailedException e = new ClassResolutionFailedException();
if (Options.v().ignore_resolution_errors()) {
logger.debug(e.getMessage());
} else {
throw e;
}
}
return null;
}
代码示例来源:origin: Sable/soot
public void autoSetOptions() {
// when no-bodies-for-excluded is enabled, also enable phantom refs
if (Options.v().no_bodies_for_excluded()) {
Options.v().set_allow_phantom_refs(true);
}
// when reflection log is enabled, also enable phantom refs
CGOptions cgOptions = new CGOptions(PhaseOptions.v().getPhaseOptions("cg"));
String log = cgOptions.reflection_log();
if ((log != null) && (log.length() > 0)) {
Options.v().set_allow_phantom_refs(true);
}
// if phantom refs enabled, ignore wrong staticness in type assigner
if (Options.v().allow_phantom_refs()) {
Options.v().set_wrong_staticness(Options.wrong_staticness_fix);
}
}
}
代码示例来源:origin: Sable/soot
if (Options.v().allow_phantom_refs()) {
SootField sf = Scene.v().makeSootField(name, type, isStatic ? Modifier.STATIC : 0);
sf.setPhantom(true);
代码示例来源:origin: ibinti/bugvm
public boolean getPhantomRefs()
{
//if( !Options.v().allow_phantom_refs() ) return false;
//return allowsPhantomRefs;
return Options.v().allow_phantom_refs();
}
代码示例来源:origin: com.bugvm/bugvm-soot
public boolean getPhantomRefs()
{
//if( !Options.v().allow_phantom_refs() ) return false;
//return allowsPhantomRefs;
return Options.v().allow_phantom_refs();
}
代码示例来源:origin: ibinti/bugvm
if(Options.v().allow_phantom_refs()) {
SootMethod m = new SootMethod(name, parameterTypes, returnType);
JimpleBody body = Jimple.v().newBody(m);
代码示例来源:origin: com.bugvm/bugvm-soot
if(Options.v().allow_phantom_refs()) {
SootMethod m = new SootMethod(name, parameterTypes, returnType);
JimpleBody body = Jimple.v().newBody(m);
内容来源于网络,如有侵权,请联系作者删除!