Package 

Class SerializerFactory


  • 
    public abstract class SerializerFactory<T extends Serializer<?>>
    
                        

    A factory that can create specialized serializers for types that match the defined pattern. A type matches the pattern if pattern.isAssignableFrom(theType). When deciding the factory to use, the Prism object selects the one with the most TypeMirror.specificity pattern. In the case of equal specificity it chooses the last one registered, in order to support overriding.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Prism<T> prism
      private final TypeMirror pattern
      private final Function1<TypeMirror, Boolean> predicate
    • Constructor Summary

      Constructors 
      Constructor Description
      SerializerFactory(Prism<T> prism, TypeMirror pattern, Function1<TypeMirror, Boolean> predicate)
    • Method Summary

      Modifier and Type Method Description
      final Prism<T> getPrism()
      final TypeMirror getPattern()
      final Function1<TypeMirror, Boolean> getPredicate()
      abstract T create(TypeMirror mirror)
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait