Class PurityChecker.PurityResult
java.lang.Object
org.checkerframework.dataflow.util.PurityChecker.PurityResult
- Enclosing class:
- PurityChecker
Result of the 
PurityChecker. Can be queried regarding whether a given tree was
 side-effect-free, deterministic, or both; also gives reasons if the answer is "no".- 
Field SummaryFieldsModifier and TypeFieldDescriptionContains all the varieties of purity that the expression has.Reasons that the referenced method is not side-effect-free and deterministic.Reasons that the referenced method is not deterministic.Reasons that the referenced method is not side-effect-free.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddNotBothReason(Tree t, String msgId) Add a reason why the method is not both side-effect-free and deterministic.voidaddNotDetReason(Tree t, String msgId) Add a reason why the method is not deterministic.voidaddNotSEFreeReason(Tree t, String msgId) Add a reason why the method is not side-effect-free.getKinds()Return the kinds of purity that the method has.Get the reasons why the method is not both side-effect-free and deterministic.Get the reasons why the method is not deterministic.Get the reasons why the method is not side-effect-free.booleanIs the method pure w.r.t.toString()
- 
Field Details- 
notSEFreeReasonsReasons that the referenced method is not side-effect-free.
- 
notDetReasonsReasons that the referenced method is not deterministic.
- 
notBothReasonsReasons that the referenced method is not side-effect-free and deterministic.
- 
kindsContains all the varieties of purity that the expression has. Starts out with all varieties, and elements are removed from it as violations are found.
 
- 
- 
Constructor Details- 
PurityResultpublic PurityResult()
 
- 
- 
Method Details- 
getKindsReturn the kinds of purity that the method has.- Returns:
- the kinds of purity that the method has
 
- 
isPureIs the method pure w.r.t. a given set of kinds?- Parameters:
- otherKinds- the varieties of purity to check
- Returns:
- true if the method is pure with respect to all the given kinds
 
- 
getNotSEFreeReasonsGet the reasons why the method is not side-effect-free.- Returns:
- the reasons why the method is not side-effect-free
 
- 
addNotSEFreeReasonAdd a reason why the method is not side-effect-free.- Parameters:
- t- a tree
- msgId- why the tree is not side-effect-free
 
- 
getNotDetReasonsGet the reasons why the method is not deterministic.- Returns:
- the reasons why the method is not deterministic
 
- 
addNotDetReasonAdd a reason why the method is not deterministic.- Parameters:
- t- a tree
- msgId- why the tree is not deterministic
 
- 
getNotBothReasonsGet the reasons why the method is not both side-effect-free and deterministic.- Returns:
- the reasons why the method is not both side-effect-free and deterministic
 
- 
addNotBothReasonAdd a reason why the method is not both side-effect-free and deterministic.- Parameters:
- t- tree
- msgId- why the tree is not deterministic and side-effect-free
 
- 
toString
 
-