public static class PurityChecker.PurityResult extends Object
PurityChecker. Can be queried regarding whether a given tree was
 side-effect-free, deterministic, or both; also gives reasons if the answer is "no".| Modifier and Type | Field and Description | 
|---|---|
protected EnumSet<Pure.Kind> | 
kinds
Contains all the varieties of purity that the expression has. 
 | 
protected List<Pair<Tree,String>> | 
notBothReasons
Reasons that the referenced method is not side-effect-free and deterministic. 
 | 
protected List<Pair<Tree,String>> | 
notDetReasons
Reasons that the referenced method is not deterministic. 
 | 
protected List<Pair<Tree,String>> | 
notSEFreeReasons
Reasons that the referenced method is not side-effect-free. 
 | 
| Constructor and Description | 
|---|
PurityResult()  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addNotBothReason(Tree t,
                String msgId)
Add a reason why the method is not both side-effect-free and deterministic. 
 | 
void | 
addNotDetReason(Tree t,
               String msgId)
Add a reason why the method is not deterministic. 
 | 
void | 
addNotSEFreeReason(Tree t,
                  String msgId)
Add a reason why the method is not side-effect-free. 
 | 
EnumSet<Pure.Kind> | 
getKinds()
Return the kinds of purity that the method has. 
 | 
List<Pair<Tree,String>> | 
getNotBothReasons()
Get the reasons why the method is not both side-effect-free and deterministic. 
 | 
List<Pair<Tree,String>> | 
getNotDetReasons()
Get the reasons why the method is not deterministic. 
 | 
List<Pair<Tree,String>> | 
getNotSEFreeReasons()
Get the reasons why the method is not side-effect-free. 
 | 
boolean | 
isPure(EnumSet<Pure.Kind> otherKinds)
Is the method pure w.r.t. 
 | 
protected final List<Pair<Tree,String>> notSEFreeReasons
protected final List<Pair<Tree,String>> notDetReasons
protected final List<Pair<Tree,String>> notBothReasons
public EnumSet<Pure.Kind> getKinds()
public boolean isPure(EnumSet<Pure.Kind> otherKinds)
otherKinds - the varieties of purity to checkpublic List<Pair<Tree,String>> getNotSEFreeReasons()
public void addNotSEFreeReason(Tree t, String msgId)
t - a treemsgId - why the tree is not side-effect-freepublic List<Pair<Tree,String>> getNotDetReasons()
public void addNotDetReason(Tree t, String msgId)
t - a treemsgId - why the tree is not deterministicpublic List<Pair<Tree,String>> getNotBothReasons()