Class PurityChecker

    • Constructor Detail

      • PurityChecker

        public PurityChecker()
    • Method Detail

      • checkPurity

        public static PurityChecker.PurityResult checkPurity​(com.sun.source.util.TreePath statement,
                                                             AnnotationProvider annoProvider,
                                                             boolean assumeSideEffectFree,
                                                             boolean assumeDeterministic)
        Compute whether the given statement is side-effect-free, deterministic, or both. Returns a result that can be queried.
        Parameters:
        statement - the statement to check
        annoProvider - the annotation provider
        assumeSideEffectFree - true if all methods should be assumed to be @SideEffectFree
        assumeDeterministic - true if all methods should be assumed to be @Deterministic
        Returns:
        information about whether the given statement is side-effect-free, deterministic, or both