Class NullPointerAnalysis


  • public class NullPointerAnalysis
    extends soot.jimple.toolkits.annotation.nullcheck.BranchedRefVarsAnalysis
    An analysis that can determine, at any point in the code, if a local variable points to null. This is just a nice wrapper class for soot's BranchedRefVarsAnalysis.
    Since:
    Ptolemy II 4.0
    Version:
    $Id$
    Author:
    Steve Neuendorffer
    Pt.AcceptedRating:
    Red (cxh)
    Pt.ProposedRating:
    Red (cxh)
    • Field Summary

      • Fields inherited from class soot.jimple.toolkits.annotation.nullcheck.BranchedRefVarsAnalysis

        emptySet, fullSet, kBottom, kNonNull, kNull, kTop, refTypeInstFieldBases, refTypeInstFields, refTypeLocals, refTypeStaticFields, refTypeValues, tempFlowSet, unitToAnalyzedChecksSet, unitToArrayRefChecksSet, unitToGenerateSet, unitToInstanceFieldRefChecksSet, unitToInstanceInvokeExprChecksSet, unitToLengthExprChecksSet, unitToPreserveSet
      • Fields inherited from class soot.toolkits.scalar.BranchedFlowAnalysis

        unitToAfterBranchFlow, unitToAfterFallFlow
      • Fields inherited from class soot.toolkits.scalar.AbstractFlowAnalysis

        filterUnitToBeforeFlow, graph, unitToBeforeFlow
    • Constructor Summary

      Constructors 
      Constructor Description
      NullPointerAnalysis​(soot.toolkits.graph.UnitGraph g)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isAlwaysNullBefore​(soot.Local local, soot.Unit unit)
      Return the set of other fields and locals that must reference the same object as the given field, at a point before the given unit.
      boolean isNeverNullBefore​(soot.Local local, soot.Unit unit)
      Return the set of other fields and locals that must reference the same object as the given local, at a point before the given unit.
      • Methods inherited from class soot.jimple.toolkits.annotation.nullcheck.BranchedRefVarsAnalysis

        anyRefInfo, copy, entryInitialFlow, flowThrough, getEquivalentValue, getKRefIntPair, isAlwaysNonNull, merge, newInitialFlow, refInfo, refInfo, treatTrapHandlersAsEntries
      • Methods inherited from class soot.toolkits.scalar.ForwardBranchedFlowAnalysis

        doAnalysis, isForward
      • Methods inherited from class soot.toolkits.scalar.BranchedFlowAnalysis

        getBranchFlowAfter, getFallFlowAfter, getFlowBefore
      • Methods inherited from class soot.toolkits.scalar.AbstractFlowAnalysis

        merge, mergeInto
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • NullPointerAnalysis

        public NullPointerAnalysis​(soot.toolkits.graph.UnitGraph g)
    • Method Detail

      • isAlwaysNullBefore

        public boolean isAlwaysNullBefore​(soot.Local local,
                                          soot.Unit unit)
        Return the set of other fields and locals that must reference the same object as the given field, at a point before the given unit.
      • isNeverNullBefore

        public boolean isNeverNullBefore​(soot.Local local,
                                         soot.Unit unit)
        Return the set of other fields and locals that must reference the same object as the given local, at a point before the given unit.