Class CircularClassReferenceConverterFactory
- java.lang.Object
-
- com.oracle.coherence.io.json.genson.convert.ChainedFactory
-
- com.oracle.coherence.io.json.genson.convert.CircularClassReferenceConverterFactory
-
public class CircularClassReferenceConverterFactory extends ChainedFactory
ChainedFactory that handles circular class references.- Author:
- Eugen Cepoi
-
-
Constructor Summary
Constructors Constructor Description CircularClassReferenceConverterFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 byChainedFactory.create(Type, Genson)with nextConverter being the converter created for current type by the next factory.-
Methods inherited from class com.oracle.coherence.io.json.genson.convert.ChainedFactory
append, find, next, withNext
-
-
-
-
Method Detail
-
create
public Converter<?> create(Type type, Genson genson)
Description copied from interface:FactoryImplementations of this method must try to create an instance of type T based on the parameter "type". If this factory can not create an object of type T for parameter type then it must return null.- Specified by:
createin interfaceFactory<Converter<?>>- Overrides:
createin classChainedFactory- Parameters:
type- used to build an instance of T.- Returns:
- null if it doesn't support this type or an instance of T (or a subclass).
-
create
protected Converter<?> create(Type type, Genson genson, Converter<?> nextConverter)
Description copied from class:ChainedFactoryThis method will be called byChainedFactory.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.- Specified by:
createin classChainedFactory- Parameters:
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.- Returns:
- null or a converter for this type
-
-