Package com.asakusafw.vocabulary.flow.graph

Examples of com.asakusafw.vocabulary.flow.graph.ObservationCount


     * @return 観測回数に関する属性
     * @throws IllegalArgumentException 引数に{@code null}が指定された場合
     */
    public ObservationCount getObservationCount(ObservationCount... defaults) {
        Precondition.checkMustNotBeNull(defaults, "defaults"); //$NON-NLS-1$
        ObservationCount current = ObservationCount.DONT_CARE;
        for (ObservationCount oc : defaults) {
            current = current.and(oc);
        }
        if (current.atLeastOnce == false) {
            if (executable.getAnnotation(Sticky.class) != null) {
                current = current.and(ObservationCount.AT_LEAST_ONCE);
            }
        }
        if (current.atMostOnce == false) {
            if (executable.getAnnotation(Volatile.class) != null) {
                current = current.and(ObservationCount.AT_MOST_ONCE);
            }
        }
        return current;
    }
View Full Code Here


     * @return 必須の副作用を有する場合のみ{@code true}
     * @throws IllegalArgumentException 引数に{@code null}が指定された場合
     */
    public static boolean hasMandatorySideEffect(FlowElement element) {
        Precondition.checkMustNotBeNull(element, "element"); //$NON-NLS-1$
        ObservationCount count = element.getAttribute(ObservationCount.class);
        if (count == null) {
            return false;
        }
        return count.atLeastOnce;
    }
View Full Code Here

     * @return 広域の副作用を有する場合のみ{@code true}
     * @throws IllegalArgumentException 引数に{@code null}が指定された場合
     */
    public static boolean hasGlobalSideEffect(FlowElement element) {
        Precondition.checkMustNotBeNull(element, "element"); //$NON-NLS-1$
        ObservationCount count = element.getAttribute(ObservationCount.class);
        if (count == null) {
            return false;
        }
        return count.atMostOnce;
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.vocabulary.flow.graph.ObservationCount

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.