本文整理汇总了Java中edu.umd.cs.findbugs.ba.ClassContext.DUMP_DATAFLOW_ANALYSIS属性的典型用法代码示例。如果您正苦于以下问题:Java ClassContext.DUMP_DATAFLOW_ANALYSIS属性的具体用法?Java ClassContext.DUMP_DATAFLOW_ANALYSIS怎么用?Java ClassContext.DUMP_DATAFLOW_ANALYSIS使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类edu.umd.cs.findbugs.ba.ClassContext
的用法示例。
在下文中一共展示了ClassContext.DUMP_DATAFLOW_ANALYSIS属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: analyze
public LiveLocalStoreDataflow analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor)
throws CheckedAnalysisException {
MethodGen methodGen = getMethodGen(analysisCache, descriptor);
if (methodGen == null) {
return null;
}
CFG cfg = getCFG(analysisCache, descriptor);
ReverseDepthFirstSearch rdfs = getReverseDepthFirstSearch(analysisCache, descriptor);
LiveLocalStoreAnalysis analysis = new LiveLocalStoreAnalysis(methodGen, rdfs, getDepthFirstSearch(analysisCache,
descriptor));
LiveLocalStoreDataflow dataflow = new LiveLocalStoreDataflow(cfg, analysis);
dataflow.execute();
if (ClassContext.DUMP_DATAFLOW_ANALYSIS) {
ClassContext.dumpLiveLocalStoreDataflow(descriptor, cfg, dataflow);
}
return dataflow;
}
示例2: getDataflow
@Override
protected BackwardTypeQualifierDataflow getDataflow(DepthFirstSearch dfs, XMethod xmethod, CFG cfg,
ValueNumberDataflow vnaDataflow, ConstantPoolGen cpg, IAnalysisCache analysisCache,
MethodDescriptor methodDescriptor, TypeQualifierValue typeQualifierValue) throws CheckedAnalysisException {
ReverseDepthFirstSearch rdfs = analysisCache.getMethodAnalysis(ReverseDepthFirstSearch.class, methodDescriptor);
BackwardTypeQualifierDataflowAnalysis analysis = new BackwardTypeQualifierDataflowAnalysis(dfs, rdfs, xmethod, cfg,
vnaDataflow, cpg, typeQualifierValue);
// Get the corresponding forward dataflow.
// We use it to halt tracking of backwards values once we know
// that they encounter a conflicting forward value.
ForwardTypeQualifierDataflowFactory forwardFactory = analysisCache.getMethodAnalysis(
ForwardTypeQualifierDataflowFactory.class, methodDescriptor);
ForwardTypeQualifierDataflow forwardDataflow = forwardFactory.getDataflow(typeQualifierValue);
analysis.setForwardTypeQualifierDataflow(forwardDataflow);
analysis.registerSourceSinkLocations();
BackwardTypeQualifierDataflow dataflow = new BackwardTypeQualifierDataflow(cfg, analysis);
dataflow.execute();
if (ClassContext.DUMP_DATAFLOW_ANALYSIS) {
dataflow.dumpDataflow(analysis);
}
return dataflow;
}
示例3: getDataflow
@Override
protected BackwardTypeQualifierDataflow getDataflow(DepthFirstSearch dfs, XMethod xmethod, CFG cfg,
ValueNumberDataflow vnaDataflow, ConstantPoolGen cpg, IAnalysisCache analysisCache,
MethodDescriptor methodDescriptor, TypeQualifierValue<?> typeQualifierValue) throws CheckedAnalysisException {
ReverseDepthFirstSearch rdfs = analysisCache.getMethodAnalysis(ReverseDepthFirstSearch.class, methodDescriptor);
BackwardTypeQualifierDataflowAnalysis analysis = new BackwardTypeQualifierDataflowAnalysis(dfs, rdfs, xmethod, cfg,
vnaDataflow, cpg, typeQualifierValue);
// Get the corresponding forward dataflow.
// We use it to halt tracking of backwards values once we know
// that they encounter a conflicting forward value.
ForwardTypeQualifierDataflowFactory forwardFactory = analysisCache.getMethodAnalysis(
ForwardTypeQualifierDataflowFactory.class, methodDescriptor);
ForwardTypeQualifierDataflow forwardDataflow = forwardFactory.getDataflow(typeQualifierValue);
analysis.setForwardTypeQualifierDataflow(forwardDataflow);
analysis.registerSourceSinkLocations();
BackwardTypeQualifierDataflow dataflow = new BackwardTypeQualifierDataflow(cfg, analysis);
dataflow.execute();
if (ClassContext.DUMP_DATAFLOW_ANALYSIS) {
dataflow.dumpDataflow(analysis);
}
return dataflow;
}
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:26,代码来源:BackwardTypeQualifierDataflowFactory.java
示例4: analyze
public IsNullValueDataflow analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor) throws CheckedAnalysisException {
MethodGen methodGen = getMethodGen(analysisCache, descriptor);
if (methodGen == null) {
throw new MethodUnprofitableException(descriptor);
}
CFG cfg = getCFG(analysisCache, descriptor);
ValueNumberDataflow vnaDataflow = getValueNumberDataflow(analysisCache, descriptor);
DepthFirstSearch dfs = getDepthFirstSearch(analysisCache, descriptor);
AssertionMethods assertionMethods = getAssertionMethods(analysisCache, descriptor.getClassDescriptor());
TypeDataflow typeDataflow = getTypeDataflow(analysisCache, descriptor);
IsNullValueAnalysis invAnalysis = new IsNullValueAnalysis(descriptor, methodGen, cfg, vnaDataflow, typeDataflow, dfs,
assertionMethods);
// Set return value and parameter databases
invAnalysis.setClassAndMethod(new JavaClassAndMethod(getJavaClass(analysisCache, descriptor.getClassDescriptor()),
getMethod(analysisCache, descriptor)));
IsNullValueDataflow invDataflow = new IsNullValueDataflow(cfg, invAnalysis);
invDataflow.execute();
if (ClassContext.DUMP_DATAFLOW_ANALYSIS) {
invDataflow.dumpDataflow(invAnalysis);
}
return invDataflow;
}
示例5: analyze
public UnconditionalValueDerefDataflow analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor)
throws CheckedAnalysisException {
MethodGen methodGen = getMethodGen(analysisCache, descriptor);
if (methodGen == null) {
throw new MethodUnprofitableException(descriptor);
}
CFG cfg = getCFG(analysisCache, descriptor);
ValueNumberDataflow vnd = getValueNumberDataflow(analysisCache, descriptor);
UnconditionalValueDerefAnalysis analysis = new UnconditionalValueDerefAnalysis(getReverseDepthFirstSearch(analysisCache,
descriptor), getDepthFirstSearch(analysisCache, descriptor), cfg, getMethod(analysisCache, descriptor),
methodGen, vnd, getAssertionMethods(analysisCache, descriptor.getClassDescriptor()));
IsNullValueDataflow inv = getIsNullValueDataflow(analysisCache, descriptor);
// XXX: hack to clear derefs on not-null branches
analysis.clearDerefsOnNonNullBranches(inv);
TypeDataflow typeDataflow = getTypeDataflow(analysisCache, descriptor);
// XXX: type analysis is needed to resolve method calls for
// checking whether call targets unconditionally dereference parameters
analysis.setTypeDataflow(typeDataflow);
UnconditionalValueDerefDataflow dataflow = new UnconditionalValueDerefDataflow(cfg, analysis);
dataflow.execute();
if (ClassContext.DUMP_DATAFLOW_ANALYSIS) {
dataflow.dumpDataflow(analysis);
}
if (UnconditionalValueDerefAnalysis.DEBUG) {
ClassContext.dumpDataflowInformation(getMethod(analysisCache, descriptor), cfg, vnd, inv, dataflow, typeDataflow);
}
return dataflow;
}
示例6: analyze
public TypeDataflow analyze(IAnalysisCache analysisCache, MethodDescriptor descriptor) throws CheckedAnalysisException {
MethodGen methodGen = getMethodGen(analysisCache, descriptor);
if (methodGen == null) {
throw new MethodUnprofitableException(descriptor);
}
CFG cfg = getCFG(analysisCache, descriptor);
DepthFirstSearch dfs = getDepthFirstSearch(analysisCache, descriptor);
ExceptionSetFactory exceptionSetFactory = getExceptionSetFactory(analysisCache, descriptor);
Method method = getMethod(analysisCache, descriptor);
TypeAnalysis typeAnalysis = new TypeAnalysis(method, methodGen, cfg, dfs, AnalysisContext.currentAnalysisContext()
.getLookupFailureCallback(), exceptionSetFactory);
if (AnalysisContext.currentAnalysisContext().getBoolProperty(AnalysisFeatures.MODEL_INSTANCEOF)) {
typeAnalysis.setValueNumberDataflow(getValueNumberDataflow(analysisCache, descriptor));
}
// Field store type database.
// If present, this can give us more accurate type information
// for values loaded from fields.
typeAnalysis.setFieldStoreTypeDatabase(AnalysisContext.currentAnalysisContext().getFieldStoreTypeDatabase());
TypeDataflow typeDataflow = new TypeDataflow(cfg, typeAnalysis);
try {
typeDataflow.execute();
} catch (CheckedAnalysisException e) {
AnalysisContext.logError("Error performing type dataflow analysis of " + descriptor, e);
throw e;
}
if (TypeAnalysis.DEBUG || ClassContext.DUMP_DATAFLOW_ANALYSIS) {
ClassContext.dumpTypeDataflow(method, cfg, typeDataflow);
}
return typeDataflow;
}
示例7: getDataflow
@Override
protected ForwardTypeQualifierDataflow getDataflow(DepthFirstSearch dfs, XMethod xmethod, CFG cfg,
ValueNumberDataflow vnaDataflow, ConstantPoolGen cpg, IAnalysisCache analysisCache,
MethodDescriptor methodDescriptor, TypeQualifierValue typeQualifierValue) throws DataflowAnalysisException {
ForwardTypeQualifierDataflowAnalysis analysis = new ForwardTypeQualifierDataflowAnalysis(dfs, xmethod, cfg, vnaDataflow,
cpg, typeQualifierValue);
analysis.registerSourceSinkLocations();
ForwardTypeQualifierDataflow dataflow = new ForwardTypeQualifierDataflow(cfg, analysis);
dataflow.execute();
if (ClassContext.DUMP_DATAFLOW_ANALYSIS) {
dataflow.dumpDataflow(analysis);
}
return dataflow;
}
示例8: getDataflow
@Override
protected ForwardTypeQualifierDataflow getDataflow(DepthFirstSearch dfs, XMethod xmethod, CFG cfg,
ValueNumberDataflow vnaDataflow, ConstantPoolGen cpg, IAnalysisCache analysisCache,
MethodDescriptor methodDescriptor, TypeQualifierValue<?> typeQualifierValue) throws DataflowAnalysisException {
ForwardTypeQualifierDataflowAnalysis analysis = new ForwardTypeQualifierDataflowAnalysis(dfs, xmethod, cfg, vnaDataflow,
cpg, typeQualifierValue);
analysis.registerSourceSinkLocations();
ForwardTypeQualifierDataflow dataflow = new ForwardTypeQualifierDataflow(cfg, analysis);
dataflow.execute();
if (ClassContext.DUMP_DATAFLOW_ANALYSIS) {
dataflow.dumpDataflow(analysis);
}
return dataflow;
}
开发者ID:OpenNTF,项目名称:FindBug-for-Domino-Designer,代码行数:15,代码来源:ForwardTypeQualifierDataflowFactory.java