}
Optional<JClassType> mixinClass = configuration.getMixInAnnotations( beanType );
// we search for @JsonCreator annotation
JConstructor creatorDefaultConstructor = null;
JConstructor creatorConstructor = null;
// we keep the list containing the mixin creator and the real creator
List<? extends JAbstractMethod> creators = Collections.emptyList();
for ( JConstructor constructor : beanType.getConstructors() ) {
if ( constructor.getParameters().length == 0 ) {
creatorDefaultConstructor = constructor;
continue;
}
// A constructor is considered as a creator if
// - he is annotated with JsonCreator and
// * all its parameters are annotated with JsonProperty
// * or it has only one parameter
// - or all its parameters are annotated with JsonProperty
List<JConstructor> constructors = new ArrayList<JConstructor>();
if ( mixinClass.isPresent() && null == mixinClass.get().isInterface() ) {
JConstructor mixinConstructor = mixinClass.get().findConstructor( constructor.getParameterTypes() );
if ( null != mixinConstructor ) {
constructors.add( mixinConstructor );
}
}
constructors.add( constructor );