Class StandardTransformFactory

    • Constructor Detail

      • StandardTransformFactory

        public StandardTransformFactory​(String name)
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: TransformFactory
        Returns a unique name of this factory. This can be used to identify a particular factory if multiple ones are used in the same generator.
        Specified by:
        getName in interface TransformFactory
        Returns:
        the unique name
      • install

        public <A,​B,​T extends Transform<A,​B>> TransformFactory install​(Class<A> from,
                                                                                         Class<B> to,
                                                                                         Supplier<T> transform)
        Description copied from interface: TransformFactory
        Installs the specified Transform.
        Specified by:
        install in interface TransformFactory
        Type Parameters:
        A - the type to transform from
        B - the type to transform to
        T - the transformer
        Parameters:
        from - the model class to transform from
        to - the model class to transform to
        transform - the view
        Returns:
        a reference to this
      • allFrom

        public <A,​T extends Transform<A,​?>> Set<Map.Entry<Class<?>,​T>> allFrom​(Class<A> model)
        Description copied from interface: TransformFactory
        Builds a stream of all transforms that match the specified model.
        Specified by:
        allFrom in interface TransformFactory
        Type Parameters:
        A - the class to transform from
        T - the transformer
        Parameters:
        model - the model class to transform from
        Returns:
        a stream of all matching transforms