@@ -139,6 +139,24 @@ public boolean isNonStaticInnerClass() {
139
139
140
140
public abstract List <AnnotatedConstructor > getConstructors ();
141
141
142
+ /**
143
+ * Helper method that will check all static methods of the bean class
144
+ * that seem like factory methods eligible to be used as Creators.
145
+ * This requires that the static method:
146
+ *<ol>
147
+ * <li>Returns type compatible with bean type (same or subtype)
148
+ * </li>
149
+ * <li>Is recognized from either explicit annotation (usually {@code @JsonCreator}
150
+ * OR naming:
151
+ * names {@code valueOf()} and {@code fromString()} are recognized but
152
+ * only for 1-argument factory methods, and in case of {@code fromString()}
153
+ * argument type must further be either {@code String} or {@code CharSequence}.
154
+ * </li>
155
+ *</ol>
156
+ * Note that caller typically applies further checks for things like visibility.
157
+ *
158
+ * @return List of static methods considered as possible Factory methods
159
+ */
142
160
public abstract List <AnnotatedMethod > getFactoryMethods ();
143
161
144
162
/**
@@ -149,22 +167,15 @@ public boolean isNonStaticInnerClass() {
149
167
public abstract AnnotatedConstructor findDefaultConstructor ();
150
168
151
169
/**
152
- * Method that can be called to locate a single-arg constructor that
153
- * takes specified exact type (will not accept supertype constructors)
154
- *
155
- * @param argTypes Type(s) of the argument that we are looking for
170
+ * @deprecated Since 2.13: instead use {@link #getConstructors()}, filter.
156
171
*/
172
+ @ Deprecated
157
173
public abstract Constructor <?> findSingleArgConstructor (Class <?>... argTypes );
158
174
159
175
/**
160
- * Method that can be called to find if introspected class declares
161
- * a static "valueOf" factory method that returns an instance of
162
- * introspected type, given one of acceptable types.
163
- *
164
- * @param expArgTypes Types that the matching single argument factory
165
- * method can take: will also accept super types of these types
166
- * (ie. arg just has to be assignable from expArgType)
176
+ * @deprecated Since 2.13: instead use {@link #getFactoryMethods()}, filter.
167
177
*/
178
+ @ Deprecated
168
179
public abstract Method findFactoryMethod (Class <?>... expArgTypes );
169
180
170
181
/*
0 commit comments