aboutsummaryrefslogtreecommitdiffstats
path: root/lint/libs/lint_checks/tests/src/com/android/tools/lint/checks/data/bytecode/FragmentTest.java.txt
blob: d27c04a4dbf36855b46e6b7462c8725cd5ee5ee4 (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
48
49
50
51
52
53
54
55
package test.pkg;

import android.annotation.SuppressLint;
import android.app.Fragment;

@SuppressWarnings("unused")
public class FragmentTest {

	// Should be public
	private static class Fragment1 extends Fragment {

	}

	// Should be static
	public class Fragment2 extends Fragment {

	}

	// Should have a public constructor
	public static class Fragment3 extends Fragment {
		private Fragment3() {
		}
	}

	// Should have a public constructor with no arguments
	public static class Fragment4 extends Fragment {
		private Fragment4(int dummy) {
		}
	}

	// Should *only* have the default constructor, not the
	// multi-argument one
	public static class Fragment5 extends Fragment {
		public Fragment5() {
		}
		public Fragment5(int dummy) {
		}
	}

	// Suppressed
	@SuppressLint("ValidFragment")
	public static class Fragment6 extends Fragment {
		private Fragment6() {
		}
	}

	public static class ValidFragment1 extends Fragment {
		public ValidFragment1() {
		}
	}

	// (Not a fragment)
	private class NotAFragment {
	}
}