Module com.speedment.common.codegen
Class StandardTransformFactory
- java.lang.Object
-
- com.speedment.common.codegen.provider.StandardTransformFactory
-
- All Implemented Interfaces:
TransformFactory
public final class StandardTransformFactory extends Object implements TransformFactory
-
-
Constructor Summary
Constructors Constructor Description StandardTransformFactory(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <A,T extends Transform<A,?>>
Set<Map.Entry<Class<?>,T>>allFrom(Class<A> model)Builds a stream of all transforms that match the specified model.StringgetName()Returns a unique name of this factory.<A,B,T extends Transform<A,B>>
TransformFactoryinstall(Class<A> from, Class<B> to, Supplier<T> transform)Installs the specifiedTransform.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.speedment.common.codegen.TransformFactory
install
-
-
-
-
Constructor Detail
-
StandardTransformFactory
public StandardTransformFactory(String name)
-
-
Method Detail
-
getName
public String getName()
Description copied from interface:TransformFactoryReturns 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:
getNamein interfaceTransformFactory- 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:TransformFactoryInstalls the specifiedTransform.- Specified by:
installin interfaceTransformFactory- Type Parameters:
A- the type to transform fromB- the type to transform toT- the transformer- Parameters:
from- the model class to transform fromto- the model class to transform totransform- 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:TransformFactoryBuilds a stream of all transforms that match the specified model.- Specified by:
allFromin interfaceTransformFactory- Type Parameters:
A- the class to transform fromT- the transformer- Parameters:
model- the model class to transform from- Returns:
- a stream of all matching transforms
-
-