summaryrefslogtreecommitdiffstats
path: root/tests/new/SourceLocationWithinExprHard.java
blob: 013e1447bfe22b54aab3a6d42e78e256ec561f93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import org.aspectj.testing.Tester;
import org.aspectj.lang.*;
import org.aspectj.lang.reflect.*;

/** @testcase PR#885 call source locations within expression */
public class SourceLocationWithinExprHard {
    public static void main (String[] args) {
        new                  // 9*
            C()              // 10
            .                // 11
            getD()           // 12*
            .                // 13
            getE()           // 14*
            .                // 15
            getF()           // 16*
            ;
        Tester.expectEvent("setup");
        Tester.checkAllEvents();
    } 
}
class C { D getD() { return new D(); } }
class D { E getE() { return new E(); } }
class E { F getF() { return new F(); } }
class F { }

aspect A {
    private static final String SEP = " - ";
    static {
        // using qualifying expr?
        Tester.expectEvent("C()" + SEP + "9");
        Tester.expectEvent("getD()" + SEP + "12");
        Tester.expectEvent("getE()" + SEP + "14");
        Tester.expectEvent("getF()" + SEP + "16");
        Tester.event("setup");
    }
    pointcut filter() : withincode(static void SourceLocationWithinExpr.main(String[]));
    before() : filter() && call(C.new()) { signal("C()", thisJoinPoint); }
    before() : filter() && call(D C.getD()) { signal("getD()", thisJoinPoint); }
    before() : filter() && call(E D.getE()) { signal("getE()", thisJoinPoint); }
    before() : filter() && call(F E.getF()) { signal("getF()", thisJoinPoint); }
    void signal(String prefix, JoinPoint jp) {
        SourceLocation sl = jp.getSourceLocation();
        System.out.println(prefix + SEP + sl.getLine());
        Tester.event(prefix + SEP + sl.getLine());
    }
}
0'>backport/47852/stable30 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/src/mixins/valueMixin.js
blob: b34a2e13b5f0f269993f423e66b8e244fd01d094 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
 * SPDX-FileCopyrightText: 2019 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

const valueMixin = {
	props: {
		value: {
			type: String,
			default: '',
		},
		check: {
			type: Object,
			default: () => { return {} },
		},
	},
	data() {
		return {
			newValue: '',
		}
	},
	watch: {
		value: {
			immediate: true,
			handler(value) {
				this.updateInternalValue(value)
			},
		},
	},
	methods: {
		updateInternalValue(value) {
			this.newValue = value
		},
	},
}

export default valueMixin