31
31
*</pre>
32
32
*/
33
33
@ SuppressWarnings ({"rawtypes" })
34
- public final class TypeFactory
34
+ public class TypeFactory // note: was final in 2.9, removed from 2.10
35
35
implements java .io .Serializable
36
36
{
37
37
private static final long serialVersionUID = 1L ;
@@ -171,6 +171,11 @@ protected TypeFactory(LRUMap<Object,JavaType> typeCache, TypeParser p,
171
171
_classLoader = classLoader ;
172
172
}
173
173
174
+ /**
175
+ * "Mutant factory" method which will construct a new instance with specified
176
+ * {@link TypeModifier} added as the first modifier to call (in case there
177
+ * are multiple registered).
178
+ */
174
179
public TypeFactory withModifier (TypeModifier mod )
175
180
{
176
181
LRUMap <Object ,JavaType > typeCache = _typeCache ;
@@ -188,6 +193,10 @@ public TypeFactory withModifier(TypeModifier mod)
188
193
return new TypeFactory (typeCache , _parser , mods , _classLoader );
189
194
}
190
195
196
+ /**
197
+ * "Mutant factory" method which will construct a new instance with specified
198
+ * {@link ClassLoader} to use by {@link #findClass}.
199
+ */
191
200
public TypeFactory withClassLoader (ClassLoader classLoader ) {
192
201
return new TypeFactory (_typeCache , _parser , _modifiers , classLoader );
193
202
}
@@ -281,7 +290,7 @@ public Class<?> findClass(String className) throws ClassNotFoundException
281
290
Throwable prob = null ;
282
291
ClassLoader loader = this .getClassLoader ();
283
292
if (loader == null ) {
284
- loader = Thread .currentThread ().getContextClassLoader ();
293
+ loader = Thread .currentThread ().getContextClassLoader ();
285
294
}
286
295
if (loader != null ) {
287
296
try {
0 commit comments