Class PurityUtils
java.lang.Object
org.checkerframework.dataflow.util.PurityUtils
- See Also:
-
Method Summary
Modifier 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?
-
Method Details
-
hasPurityAnnotation
Does the methodmethodTreehave any purity annotation?- Parameters:
provider- how to get annotationsmethodTree- a method to test- Returns:
- whether the method has any purity annotations
-
hasPurityAnnotation
public static boolean hasPurityAnnotation(AnnotationProvider provider, ExecutableElement methodElement) Does the methodmethodElementhave any purity annotation?- Parameters:
provider- how to get annotationsmethodElement- a method to test- Returns:
- whether the method has any purity annotations
-
isDeterministic
Is the methodmethodTreedeterministic?- Parameters:
provider- how to get annotationsmethodTree- a method to test- Returns:
- whether the method is deterministic
-
isDeterministic
Is the methodmethodElementdeterministic?- Parameters:
provider- how to get annotationsmethodElement- 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 annotationsmethodTree- a method to test- Returns:
- whether the method is side-effect-free
-
isSideEffectFree
public 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 annotationsmethodElement- a method to test- Returns:
- whether the method is side-effect-free
-
getPurityKinds
Returns the purity annotations on the methodmethodTree.- Parameters:
provider- how to get annotations. ItsAnnotationProvider.isSideEffectFree(javax.lang.model.element.ExecutableElement)andAnnotationProvider.isDeterministic(javax.lang.model.element.ExecutableElement)methods are not used.methodTree- a method to test- Returns:
- the types of purity of the method
methodTree
-
getPurityKinds
public static EnumSet<Pure.Kind> getPurityKinds(AnnotationProvider provider, ExecutableElement methodElement) Returns the purity annotations on the methodmethodElement.- Parameters:
provider- how to get annotations. ItsAnnotationProvider.isSideEffectFree(javax.lang.model.element.ExecutableElement)andAnnotationProvider.isDeterministic(javax.lang.model.element.ExecutableElement)methods are not used.methodElement- a method to test- Returns:
- the types of purity of the method
methodElement
-
AnnotationProvider.isSideEffectFree(javax.lang.model.element.ExecutableElement)