public class PurityUtils
extends java.lang.Object
SideEffectFree
,
Deterministic
,
Pure
Constructor and Description |
---|
PurityUtils() |
Modifier and Type | Method and Description |
---|---|
static java.util.List<Pure.Kind> |
getPurityKinds(AnnotationProvider provider,
javax.lang.model.element.Element methodElement) |
static java.util.List<Pure.Kind> |
getPurityKinds(AnnotationProvider provider,
com.sun.source.tree.MethodTree tree) |
static boolean |
hasPurityAnnotation(AnnotationProvider provider,
javax.lang.model.element.Element methodElement)
Does the method
methodElement have any purity annotation? |
static boolean |
hasPurityAnnotation(AnnotationProvider provider,
com.sun.source.tree.MethodTree tree)
Does the method
tree have any purity annotation? |
static boolean |
isDeterministic(AnnotationProvider provider,
javax.lang.model.element.Element methodElement)
Is the method
methodElement deterministic? |
static boolean |
isDeterministic(AnnotationProvider provider,
com.sun.source.tree.MethodTree tree)
Is the method
tree deterministic? |
static boolean |
isSideEffectFree(AnnotationProvider provider,
javax.lang.model.element.Element methodElement)
Is the method
methodElement side-effect-free? |
static boolean |
isSideEffectFree(AnnotationProvider provider,
com.sun.source.tree.MethodTree tree)
Is the method
tree side-effect-free? |
public static boolean hasPurityAnnotation(AnnotationProvider provider, com.sun.source.tree.MethodTree tree)
tree
have any purity annotation?public static boolean hasPurityAnnotation(AnnotationProvider provider, javax.lang.model.element.Element methodElement)
methodElement
have any purity annotation?public static boolean isDeterministic(AnnotationProvider provider, com.sun.source.tree.MethodTree tree)
tree
deterministic?public static boolean isDeterministic(AnnotationProvider provider, javax.lang.model.element.Element methodElement)
methodElement
deterministic?public static boolean isSideEffectFree(AnnotationProvider provider, com.sun.source.tree.MethodTree tree)
tree
side-effect-free?public static boolean isSideEffectFree(AnnotationProvider provider, javax.lang.model.element.Element methodElement)
methodElement
side-effect-free?public static java.util.List<Pure.Kind> getPurityKinds(AnnotationProvider provider, com.sun.source.tree.MethodTree tree)
tree
.public static java.util.List<Pure.Kind> getPurityKinds(AnnotationProvider provider, javax.lang.model.element.Element methodElement)
methodElement
. TODO: should the return type
be an EnumSet?