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 types of purity of the method
methodElement . |
static EnumSet<Pure.Kind> |
getPurityKinds(AnnotationProvider provider,
MethodTree methodTree)
Returns the types of purity of 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)
Is the method
methodTree side-effect-free? |
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 testpublic static boolean isSideEffectFree(AnnotationProvider provider, MethodTree methodTree)
methodTree
side-effect-free?provider
- how to get annotationsmethodTree
- a method to testpublic static boolean isSideEffectFree(AnnotationProvider provider, ExecutableElement methodElement)
methodElement
side-effect-free?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 testmethodTree
public static EnumSet<Pure.Kind> getPurityKinds(AnnotationProvider provider, ExecutableElement methodElement)
methodElement
.provider
- how to get annotationsmethodElement
- a method to testmethodElement