Skip to content

Commit fe2b73e

Browse files
author
Sauyon Lee
committed
Stub more of Spring
1 parent d4bb8a7 commit fe2b73e

File tree

6 files changed

+524
-45
lines changed

6 files changed

+524
-45
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright 2002-2017 the original author or 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+
* https://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+
17+
package org.springframework.context;
18+
19+
public interface MessageSourceResolvable {
20+
String[] getCodes();
21+
22+
default Object[] getArguments() {
23+
return null;
24+
}
25+
26+
default String getDefaultMessage() {
27+
return null;
28+
}
29+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
/*
2+
* Copyright 2002-2019 the original author or 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+
* https://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+
17+
package org.springframework.context.support;
18+
19+
import java.io.Serializable;
20+
import org.springframework.context.MessageSourceResolvable;
21+
import org.springframework.lang.Nullable;
22+
23+
public class DefaultMessageSourceResolvable implements MessageSourceResolvable, Serializable {
24+
public DefaultMessageSourceResolvable(String code) {}
25+
26+
public DefaultMessageSourceResolvable(String[] codes) {}
27+
28+
public DefaultMessageSourceResolvable(String[] codes, String defaultMessage) {}
29+
30+
public DefaultMessageSourceResolvable(String[] codes, Object[] arguments) {}
31+
32+
public DefaultMessageSourceResolvable(
33+
@Nullable String[] codes, @Nullable Object[] arguments, @Nullable String defaultMessage) {}
34+
35+
public DefaultMessageSourceResolvable(MessageSourceResolvable resolvable) {}
36+
37+
public String getCode() {
38+
return null;
39+
}
40+
41+
@Override
42+
public String[] getCodes() {
43+
return null;
44+
}
45+
46+
@Override
47+
public Object[] getArguments() {
48+
return null;
49+
}
50+
51+
@Override
52+
public String getDefaultMessage() {
53+
return null;
54+
}
55+
56+
public boolean shouldRenderDefaultMessage() {
57+
return false;
58+
}
59+
60+
@Override
61+
public String toString() {
62+
return null;
63+
}
64+
65+
@Override
66+
public boolean equals(@Nullable Object other) {
67+
return false;
68+
}
69+
70+
@Override
71+
public int hashCode() {
72+
return 0;
73+
}
74+
75+
protected final String resolvableToString() {
76+
return null;
77+
}
78+
}
Lines changed: 183 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,188 @@
1-
// Generated automatically from org.springframework.util.ObjectUtils for testing purposes
1+
/*
2+
* Copyright 2002-2019 the original author or 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+
* https://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+
*/
216

317
package org.springframework.util;
418

519

6-
abstract public class ObjectUtils
7-
{
8-
public ObjectUtils(){}
9-
public static <A, O extends A> A[] addObjectToArray(A[] p0, O p1){ return null; }
10-
public static <E extends Enum<? extends Object>> E caseInsensitiveValueOf(E[] p0, String p1){ return null; }
11-
public static Object unwrapOptional(Object p0){ return null; }
12-
public static Object[] toObjectArray(Object p0){ return null; }
13-
public static String getDisplayString(Object p0){ return null; }
14-
public static String getIdentityHexString(Object p0){ return null; }
15-
public static String identityToString(Object p0){ return null; }
16-
public static String nullSafeClassName(Object p0){ return null; }
17-
public static String nullSafeToString(Object p0){ return null; }
18-
public static String nullSafeToString(Object[] p0){ return null; }
19-
public static String nullSafeToString(boolean[] p0){ return null; }
20-
public static String nullSafeToString(byte[] p0){ return null; }
21-
public static String nullSafeToString(char[] p0){ return null; }
22-
public static String nullSafeToString(double[] p0){ return null; }
23-
public static String nullSafeToString(float[] p0){ return null; }
24-
public static String nullSafeToString(int[] p0){ return null; }
25-
public static String nullSafeToString(long[] p0){ return null; }
26-
public static String nullSafeToString(short[] p0){ return null; }
27-
public static boolean containsConstant(Enum<? extends Object>[] p0, String p1){ return false; }
28-
public static boolean containsConstant(Enum<? extends Object>[] p0, String p1, boolean p2){ return false; }
29-
public static boolean containsElement(Object[] p0, Object p1){ return false; }
30-
public static boolean isArray(Object p0){ return false; }
31-
public static boolean isCheckedException(Throwable p0){ return false; }
32-
public static boolean isCompatibleWithThrowsClause(Throwable p0, Class<? extends Object>... p1){ return false; }
33-
public static boolean isEmpty(Object p0){ return false; }
34-
public static boolean isEmpty(Object[] p0){ return false; }
35-
public static boolean nullSafeEquals(Object p0, Object p1){ return false; }
36-
public static int hashCode(boolean p0){ return 0; }
37-
public static int hashCode(double p0){ return 0; }
38-
public static int hashCode(float p0){ return 0; }
39-
public static int hashCode(long p0){ return 0; }
40-
public static int nullSafeHashCode(Object p0){ return 0; }
41-
public static int nullSafeHashCode(Object[] p0){ return 0; }
42-
public static int nullSafeHashCode(boolean[] p0){ return 0; }
43-
public static int nullSafeHashCode(byte[] p0){ return 0; }
44-
public static int nullSafeHashCode(char[] p0){ return 0; }
45-
public static int nullSafeHashCode(double[] p0){ return 0; }
46-
public static int nullSafeHashCode(float[] p0){ return 0; }
47-
public static int nullSafeHashCode(int[] p0){ return 0; }
48-
public static int nullSafeHashCode(long[] p0){ return 0; }
49-
public static int nullSafeHashCode(short[] p0){ return 0; }
20+
import org.springframework.lang.Nullable;
21+
22+
public abstract class ObjectUtils {
23+
public static boolean isCheckedException(Throwable ex) {
24+
return false;
25+
}
26+
27+
public static boolean isCompatibleWithThrowsClause(
28+
Throwable ex, @Nullable Class<?>... declaredExceptions) {
29+
return false;
30+
}
31+
32+
public static boolean isArray(@Nullable Object obj) {
33+
return false;
34+
}
35+
36+
public static boolean isEmpty(@Nullable Object[] array) {
37+
return false;
38+
}
39+
40+
public static boolean isEmpty(@Nullable Object obj) {
41+
return false;
42+
}
43+
44+
public static Object unwrapOptional(@Nullable Object obj) {
45+
return null;
46+
}
47+
48+
public static boolean containsElement(@Nullable Object[] array, Object element) {
49+
return false;
50+
}
51+
52+
public static boolean containsConstant(Enum<?>[] enumValues, String constant) {
53+
return false;
54+
}
55+
56+
public static boolean containsConstant(
57+
Enum<?>[] enumValues, String constant, boolean caseSensitive) {
58+
return false;
59+
}
60+
61+
public static <E extends Enum<?>> E caseInsensitiveValueOf(E[] enumValues, String constant) {
62+
return null;
63+
}
64+
65+
public static <A, O extends A> A[] addObjectToArray(@Nullable A[] array, @Nullable O obj) {
66+
return null;
67+
}
68+
69+
public static Object[] toObjectArray(@Nullable Object source) {
70+
return null;
71+
}
72+
73+
public static boolean nullSafeEquals(@Nullable Object o1, @Nullable Object o2) {
74+
return false;
75+
}
76+
77+
public static int nullSafeHashCode(@Nullable Object obj) {
78+
return 0;
79+
}
80+
81+
public static int nullSafeHashCode(@Nullable Object[] array) {
82+
return 0;
83+
}
84+
85+
public static int nullSafeHashCode(@Nullable boolean[] array) {
86+
return 0;
87+
}
88+
89+
public static int nullSafeHashCode(@Nullable byte[] array) {
90+
return 0;
91+
}
92+
93+
public static int nullSafeHashCode(@Nullable char[] array) {
94+
return 0;
95+
}
96+
97+
public static int nullSafeHashCode(@Nullable double[] array) {
98+
return 0;
99+
}
100+
101+
public static int nullSafeHashCode(@Nullable float[] array) {
102+
return 0;
103+
}
104+
105+
public static int nullSafeHashCode(@Nullable int[] array) {
106+
return 0;
107+
}
108+
109+
public static int nullSafeHashCode(@Nullable long[] array) {
110+
return 0;
111+
}
112+
113+
public static int nullSafeHashCode(@Nullable short[] array) {
114+
return 0;
115+
}
116+
117+
public static int hashCode(boolean bool) {
118+
return 0;
119+
}
120+
121+
public static int hashCode(double dbl) {
122+
return 0;
123+
}
124+
125+
public static int hashCode(float flt) {
126+
return 0;
127+
}
128+
129+
public static int hashCode(long lng) {
130+
return 0;
131+
}
132+
133+
public static String identityToString(@Nullable Object obj) {
134+
return null;
135+
}
136+
137+
public static String getIdentityHexString(Object obj) {
138+
return null;
139+
}
140+
141+
public static String getDisplayString(@Nullable Object obj) {
142+
return null;
143+
}
144+
145+
public static String nullSafeClassName(@Nullable Object obj) {
146+
return null;
147+
}
148+
149+
public static String nullSafeToString(@Nullable Object obj) {
150+
return null;
151+
}
152+
153+
public static String nullSafeToString(@Nullable Object[] array) {
154+
return null;
155+
}
156+
157+
public static String nullSafeToString(@Nullable boolean[] array) {
158+
return null;
159+
}
160+
161+
public static String nullSafeToString(@Nullable byte[] array) {
162+
return null;
163+
}
164+
165+
public static String nullSafeToString(@Nullable char[] array) {
166+
return null;
167+
}
168+
169+
public static String nullSafeToString(@Nullable double[] array) {
170+
return null;
171+
}
172+
173+
public static String nullSafeToString(@Nullable float[] array) {
174+
return null;
175+
}
176+
177+
public static String nullSafeToString(@Nullable int[] array) {
178+
return null;
179+
}
180+
181+
public static String nullSafeToString(@Nullable long[] array) {
182+
return null;
183+
}
184+
185+
public static String nullSafeToString(@Nullable short[] array) {
186+
return null;
187+
}
50188
}

0 commit comments

Comments
 (0)