public class PurityUtils extends Object
SideEffectFree,
Deterministic,
Pure| Constructor and Description |
|---|
PurityUtils() |
| Modifier and Type | Method and Description |
|---|---|
static EnumSet<Pure.Kind> |
getPurityKinds(AnnotationProvider provider,
ExecutableElement methodElement)
Returns the purity annotations on the method
methodElement. |
static EnumSet<Pure.Kind> |
getPurityKinds(AnnotationProvider provider,
MethodTree methodTree)
Returns the purity annotations on the method
methodTree. |
static boolean |
hasPurityAnnotation(AnnotationProvider provider,
ExecutableElement methodElement)
Does the method
methodElement have any purity annotation? |
static boolean |
hasPurityAnnotation(AnnotationProvider provider,
MethodTree methodTree)
Does the method
methodTree have any purity annotation? |
static boolean |
isDeterministic(AnnotationProvider provider,
ExecutableElement methodElement)
Is the method
methodElement deterministic? |
static boolean |
isDeterministic(AnnotationProvider provider,
MethodTree methodTree)
Is the method
methodTree deterministic? |
static boolean |
isSideEffectFree(AnnotationProvider provider,
ExecutableElement methodElement)
Is the method
methodElement side-effect-free? |
static boolean |
isSideEffectFree(AnnotationProvider provider,
MethodTree methodTree)
|
public static boolean hasPurityAnnotation(AnnotationProvider provider, MethodTree methodTree)
methodTree have any purity annotation?provider - how to get annotationsmethodTree - a method to testpublic static boolean hasPurityAnnotation(AnnotationProvider provider, ExecutableElement methodElement)
methodElement have any purity annotation?provider - how to get annotationsmethodElement - a method to testpublic static boolean isDeterministic(AnnotationProvider provider, MethodTree methodTree)
methodTree deterministic?provider - how to get annotationsmethodTree - a method to testpublic static boolean isDeterministic(AnnotationProvider provider, ExecutableElement methodElement)
methodElement deterministic?provider - how to get annotationsmethodElement - a method to test@Deprecated public static boolean isSideEffectFree(AnnotationProvider provider, MethodTree methodTree)
methodTree side-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.
provider - how to get annotationsmethodTree - a method to testpublic static boolean isSideEffectFree(AnnotationProvider provider, ExecutableElement methodElement)
methodElement side-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.
provider - how to get annotationsmethodElement - a method to testpublic static EnumSet<Pure.Kind> getPurityKinds(AnnotationProvider provider, MethodTree methodTree)
methodTree.provider - how to get annotationsmethodTree - a method to testmethodTreepublic static EnumSet<Pure.Kind> getPurityKinds(AnnotationProvider provider, ExecutableElement methodElement)
methodElement.provider - how to get annotationsmethodElement - a method to testmethodElement