Class PurityUtils
java.lang.Object
org.checkerframework.dataflow.util.PurityUtils
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptiongetPurityKinds(AnnotationProvider provider, MethodTree methodTree) Returns the purity annotations on the methodmethodTree.getPurityKinds(AnnotationProvider provider, ExecutableElement methodElement) Returns the purity annotations on the methodmethodElement.static booleanhasPurityAnnotation(AnnotationProvider provider, MethodTree methodTree) Does the methodmethodTreehave any purity annotation?static booleanhasPurityAnnotation(AnnotationProvider provider, ExecutableElement methodElement) Does the methodmethodElementhave any purity annotation?static booleanisDeterministic(AnnotationProvider provider, MethodTree methodTree) Is the methodmethodTreedeterministic?static booleanisDeterministic(AnnotationProvider provider, ExecutableElement methodElement) Is the methodmethodElementdeterministic?static booleanisSideEffectFree(AnnotationProvider provider, MethodTree methodTree) Deprecated.static booleanisSideEffectFree(AnnotationProvider provider, ExecutableElement methodElement) Is the methodmethodElementside-effect-free?
- 
Constructor Details- 
PurityUtilspublic PurityUtils()
 
- 
- 
Method Details- 
hasPurityAnnotationDoes the methodmethodTreehave any purity annotation?- Parameters:
- provider- how to get annotations
- methodTree- a method to test
- Returns:
- whether the method has any purity annotations
 
- 
hasPurityAnnotationpublic static boolean hasPurityAnnotation(AnnotationProvider provider, ExecutableElement methodElement) Does the methodmethodElementhave any purity annotation?- Parameters:
- provider- how to get annotations
- methodElement- a method to test
- Returns:
- whether the method has any purity annotations
 
- 
isDeterministicIs the methodmethodTreedeterministic?- Parameters:
- provider- how to get annotations
- methodTree- a method to test
- Returns:
- whether the method is deterministic
 
- 
isDeterministicIs the methodmethodElementdeterministic?- Parameters:
- provider- how to get annotations
- methodElement- a method to test
- Returns:
- whether the method is deterministic
 
- 
isSideEffectFree@Deprecated public static boolean isSideEffectFree(AnnotationProvider provider, MethodTree methodTree) Is the methodmethodTreeside-effect-free?This method does not use, and has different semantics than, AnnotationProvider.isSideEffectFree(javax.lang.model.element.ExecutableElement). This method is concerned only with standard purity annotations.- Parameters:
- provider- how to get annotations
- methodTree- a method to test
- Returns:
- whether the method is side-effect-free
 
- 
isSideEffectFreepublic static boolean isSideEffectFree(AnnotationProvider provider, ExecutableElement methodElement) Is the methodmethodElementside-effect-free?This method does not use, and has different semantics than, AnnotationProvider.isSideEffectFree(javax.lang.model.element.ExecutableElement). This method is concerned only with standard purity annotations.- Parameters:
- provider- how to get annotations
- methodElement- a method to test
- Returns:
- whether the method is side-effect-free
 
- 
getPurityKindsReturns the purity annotations on the methodmethodTree.- Parameters:
- provider- how to get annotations
- methodTree- a method to test
- Returns:
- the types of purity of the method methodTree
 
- 
getPurityKindspublic static EnumSet<Pure.Kind> getPurityKinds(AnnotationProvider provider, ExecutableElement methodElement) Returns the purity annotations on the methodmethodElement.- Parameters:
- provider- how to get annotations
- methodElement- a method to test
- Returns:
- the types of purity of the method methodElement
 
 
- 
AnnotationProvider.isSideEffectFree(javax.lang.model.element.ExecutableElement)