File: Complex.java

package info (click to toggle)
checker-framework-java 3.2.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 22,840 kB
  • sloc: java: 145,910; xml: 839; sh: 518; makefile: 401; perl: 26
file content (40 lines) | stat: -rw-r--r-- 1,133 bytes parent folder | download | duplicates (3)
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
package flowexpression;

import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import testlib.flowexpression.qual.FlowExp;

public class Complex {
    class DocCategory {
        public Map<String, String> fields = new HashMap<>();
    }

    protected DocCategory[] categories = new DocCategory[2];

    void test() {
        for (int c = 0; c < categories.length; c++) {

            for (
            @FlowExp("categories[c].fields") String field : sortedKeySet(categories[c].fields)) {
                @FlowExp("categories[c].fields") String f = field;
            }
        }
    }

    public static <K extends Comparable<? super K>, V> Collection<@FlowExp("#1") K> sortedKeySet(
            Map<K, V> m) {
        throw new RuntimeException();
    }

    private static Map<Integer, List<@FlowExp("succs1") Integer>> succs1 = new HashMap<>();

    void method() {
        Map<Integer, List<Integer>> dom1post = dominators(succs1);
    }

    public static <T> Map<T, List<T>> dominators(Map<T, List<@FlowExp("#1") T>> predecessors) {
        throw new RuntimeException();
    }
}