本文整理匯總了Java中com.ibm.wala.ipa.callgraph.impl.Everywhere類的典型用法代碼示例。如果您正苦於以下問題:Java Everywhere類的具體用法?Java Everywhere怎麽用?Java Everywhere使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Everywhere類屬於com.ibm.wala.ipa.callgraph.impl包,在下文中一共展示了Everywhere類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createIR
import com.ibm.wala.ipa.callgraph.impl.Everywhere; //導入依賴的package包/類
public Map<IMethod, IR> createIR() throws java.io.IOException {
Map<IMethod, IR> result = new HashMap<IMethod, IR>();
engine.buildAnalysisScope();
IClassHierarchy cha = engine.getClassHierarchy();
SSAOptions options = new SSAOptions();
IRFactory<IMethod> F = AstIRFactory.makeDefaultFactory();
for(Iterator<IClass> clss = cha.iterator(); clss.hasNext(); ) {
IClass cls = clss.next();
ClassLoaderReference clr = cls.getClassLoader().getReference();
if ( !(clr.equals(ClassLoaderReference.Primordial)
||
clr.equals(ClassLoaderReference.Extension)))
{
for (Iterator<IMethod> ms = cls.getDeclaredMethods().iterator();
ms.hasNext(); )
{
IMethod m = ms.next();
IR ir = F.makeIR(m, Everywhere.EVERYWHERE, options);
result.put(m, ir);
}
}
}
return result;
}
示例2: findIRForMethod
import com.ibm.wala.ipa.callgraph.impl.Everywhere; //導入依賴的package包/類
public IR findIRForMethod(IMethod m) {
try {
IInstruction[] instructions = ((IBytecodeMethod) m).getInstructions();
if (instructions != null) {
return cache.getSSACache().findOrCreateIR(m, Everywhere.EVERYWHERE,
options.getSSAOptions());
}
} catch (InvalidClassFileException e) {
e.printStackTrace();
}
return null;
}
示例3: findDefUseForMethod
import com.ibm.wala.ipa.callgraph.impl.Everywhere; //導入依賴的package包/類
public DefUse findDefUseForMethod(IMethod method) {
return cache.getSSACache().findOrCreateDU(method,
Everywhere.EVERYWHERE, options.getSSAOptions());
}