@@ -28,9 +28,6 @@ final class AnnotatedCreatorCollector
28
28
29
29
private final TypeResolutionContext _typeContext ;
30
30
31
- // @since 2.11.3
32
- private final TypeFactory _typeFactory ;
33
-
34
31
/**
35
32
* @since 2.11
36
33
*/
@@ -40,11 +37,10 @@ final class AnnotatedCreatorCollector
40
37
41
38
private AnnotatedConstructor _defaultConstructor ;
42
39
43
- AnnotatedCreatorCollector (AnnotationIntrospector intr , TypeFactory tf ,
40
+ AnnotatedCreatorCollector (AnnotationIntrospector intr ,
44
41
TypeResolutionContext tc , boolean collectAnnotations )
45
42
{
46
43
super (intr );
47
- _typeFactory = tf ;
48
44
_typeContext = tc ;
49
45
_collectAnnotations = collectAnnotations ;
50
46
}
@@ -60,18 +56,18 @@ public static Creators collectCreators(AnnotationIntrospector intr,
60
56
&& !ClassUtil .isJDKClass (type .getRawClass ());
61
57
62
58
// Constructor also always members of resolved class, parent == resolution context
63
- return new AnnotatedCreatorCollector (intr , typeFactory , tc , checkClassAnnotations )
64
- .collect (type , primaryMixIn );
59
+ return new AnnotatedCreatorCollector (intr , tc , checkClassAnnotations )
60
+ .collect (typeFactory , type , primaryMixIn );
65
61
}
66
62
67
- Creators collect (JavaType type , Class <?> primaryMixIn )
63
+ Creators collect (TypeFactory typeFactory , JavaType type , Class <?> primaryMixIn )
68
64
{
69
65
// 30-Apr-2016, tatu: [databind#1215]: Actually, while true, this does
70
66
// NOT apply to context since sub-class may have type bindings
71
67
// TypeResolutionContext typeContext = new TypeResolutionContext.Basic(_typeFactory, _type.getBindings());
72
68
73
69
List <AnnotatedConstructor > constructors = _findPotentialConstructors (type , primaryMixIn );
74
- List <AnnotatedMethod > factories = _findPotentialFactories (type , primaryMixIn );
70
+ List <AnnotatedMethod > factories = _findPotentialFactories (typeFactory , type , primaryMixIn );
75
71
76
72
/* And then... let's remove all constructors that are deemed
77
73
* ignorable after all annotations have been properly collapsed.
@@ -191,7 +187,8 @@ private List<AnnotatedConstructor> _findPotentialConstructors(JavaType type,
191
187
return result ;
192
188
}
193
189
194
- private List <AnnotatedMethod > _findPotentialFactories (JavaType type , Class <?> primaryMixIn )
190
+ private List <AnnotatedMethod > _findPotentialFactories (TypeFactory typeFactory ,
191
+ JavaType type , Class <?> primaryMixIn )
195
192
{
196
193
List <Method > candidates = null ;
197
194
@@ -216,7 +213,7 @@ private List<AnnotatedMethod> _findPotentialFactories(JavaType type, Class<?> pr
216
213
// passing that should not break things, it appears to... Regardless,
217
214
// it should not be needed or useful as those bindings are only available
218
215
// to non-static members
219
- TypeResolutionContext typeResCtxt = new TypeResolutionContext .Empty (_typeFactory );
216
+ TypeResolutionContext typeResCtxt = new TypeResolutionContext .Empty (typeFactory );
220
217
221
218
int factoryCount = candidates .size ();
222
219
List <AnnotatedMethod > result = new ArrayList <>(factoryCount );
0 commit comments