• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright 2020 The JSpecify Authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 import org.jspecify.annotations.NullMarked;
17 import org.jspecify.annotations.Nullable;
18 import org.jspecify.annotations.NullnessUnspecified;
19 
20 @NullMarked
21 class TypeVariableUnspecToObjectUnionNull<
22     Never1T,
23     ChildOfNever1T extends Never1T,
24     UnspecChildOfNever1T extends @NullnessUnspecified Never1T,
25     NullChildOfNever1T extends @Nullable Never1T,
26     //
27     Never2T extends Object,
28     ChildOfNever2T extends Never2T,
29     UnspecChildOfNever2T extends @NullnessUnspecified Never2T,
30     NullChildOfNever2T extends @Nullable Never2T,
31     //
32     UnspecT extends @NullnessUnspecified Object,
33     ChildOfUnspecT extends UnspecT,
34     UnspecChildOfUnspecT extends @NullnessUnspecified UnspecT,
35     NullChildOfUnspecT extends @Nullable UnspecT,
36     //
37     ParametricT extends @Nullable Object,
38     ChildOfParametricT extends ParametricT,
39     UnspecChildOfParametricT extends @NullnessUnspecified ParametricT,
40     NullChildOfParametricT extends @Nullable ParametricT,
41     //
42     UnusedT> {
x0(@ullnessUnspecified Never1T x)43   @Nullable Object x0(@NullnessUnspecified Never1T x) {
44     return x;
45   }
46 
x1(@ullnessUnspecified ChildOfNever1T x)47   @Nullable Object x1(@NullnessUnspecified ChildOfNever1T x) {
48     return x;
49   }
50 
x2(@ullnessUnspecified UnspecChildOfNever1T x)51   @Nullable Object x2(@NullnessUnspecified UnspecChildOfNever1T x) {
52     return x;
53   }
54 
x3(@ullnessUnspecified NullChildOfNever1T x)55   @Nullable Object x3(@NullnessUnspecified NullChildOfNever1T x) {
56     return x;
57   }
58 
x4(@ullnessUnspecified Never2T x)59   @Nullable Object x4(@NullnessUnspecified Never2T x) {
60     return x;
61   }
62 
x5(@ullnessUnspecified ChildOfNever2T x)63   @Nullable Object x5(@NullnessUnspecified ChildOfNever2T x) {
64     return x;
65   }
66 
x6(@ullnessUnspecified UnspecChildOfNever2T x)67   @Nullable Object x6(@NullnessUnspecified UnspecChildOfNever2T x) {
68     return x;
69   }
70 
x7(@ullnessUnspecified NullChildOfNever2T x)71   @Nullable Object x7(@NullnessUnspecified NullChildOfNever2T x) {
72     return x;
73   }
74 
x8(@ullnessUnspecified UnspecT x)75   @Nullable Object x8(@NullnessUnspecified UnspecT x) {
76     return x;
77   }
78 
x9(@ullnessUnspecified ChildOfUnspecT x)79   @Nullable Object x9(@NullnessUnspecified ChildOfUnspecT x) {
80     return x;
81   }
82 
x10(@ullnessUnspecified UnspecChildOfUnspecT x)83   @Nullable Object x10(@NullnessUnspecified UnspecChildOfUnspecT x) {
84     return x;
85   }
86 
x11(@ullnessUnspecified NullChildOfUnspecT x)87   @Nullable Object x11(@NullnessUnspecified NullChildOfUnspecT x) {
88     return x;
89   }
90 
x12(@ullnessUnspecified ParametricT x)91   @Nullable Object x12(@NullnessUnspecified ParametricT x) {
92     return x;
93   }
94 
x13(@ullnessUnspecified ChildOfParametricT x)95   @Nullable Object x13(@NullnessUnspecified ChildOfParametricT x) {
96     return x;
97   }
98 
x14(@ullnessUnspecified UnspecChildOfParametricT x)99   @Nullable Object x14(@NullnessUnspecified UnspecChildOfParametricT x) {
100     return x;
101   }
102 
x15(@ullnessUnspecified NullChildOfParametricT x)103   @Nullable Object x15(@NullnessUnspecified NullChildOfParametricT x) {
104     return x;
105   }
106 }
107