public class CircularClassReferenceConverterFactory extends ChainedFactory
Constructor and Description |
---|
CircularClassReferenceConverterFactory() |
Modifier and Type | Method and Description |
---|---|
Converter<?> |
create(Type type,
Genson genson)
Implementations of this method must try to create an instance of type T based on the
parameter "type".
|
protected Converter<?> |
create(Type type,
Genson genson,
Converter<?> nextConverter)
This method will be called by
ChainedFactory.create(Type, Genson) with nextConverter being the
converter created for current type by the next factory. |
append, next, withNext
public CircularClassReferenceConverterFactory()
public Converter<?> create(Type type, Genson genson)
Factory
create
in interface Factory<Converter<?>>
create
in class ChainedFactory
type
- used to build an instance of T.protected Converter<?> create(Type type, Genson genson, Converter<?> nextConverter)
ChainedFactory
ChainedFactory.create(Type, Genson)
with nextConverter being the
converter created for current type by the next factory. This means that ChainedFactory will
first create a converter with the next factory and then use it's own create method.create
in class ChainedFactory
type
- for which this factory must provide a convertergenson
- instance that you can use when you need a converter for some other type (for
example a converter of List<Integer> will need a converter for Integer type).nextConverter
- created by the next factory, may be null.Copyright © 2019. All rights reserved.