Module com.speedment.common.codegen
Class StandardJavaGenerator
- java.lang.Object
-
- com.speedment.common.codegen.provider.StandardJavaGenerator
-
-
Constructor Summary
Constructors Constructor Description StandardJavaGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DependencyManagergetDependencyMgr()Returns theDependencyManagercurrently being used.RenderStackgetRenderStack()Returns the current rendering stack.<A,B>
Stream<Meta<A,B>>metaOn(A from, Class<B> to)Renders the specified model into a stream of code models.<A,B>
Optional<Meta<A,B>>transform(Transform<A,B> transform, A model, TransformFactory factory)Transforms the specified model using the specifiedTransformfrom the specifiedTransformFactory.
-
-
-
Method Detail
-
getDependencyMgr
public DependencyManager getDependencyMgr()
Description copied from interface:GeneratorReturns theDependencyManagercurrently being used.- Specified by:
getDependencyMgrin interfaceGenerator- Returns:
- the dependency manager
- See Also:
DependencyManager
-
getRenderStack
public RenderStack getRenderStack()
Description copied from interface:GeneratorReturns the current rendering stack. The top element will be the one most recent rendered and the bottom one will be the element that was first passed to the generator. Elements are removed from the stack once they have finished rendering.If an element needs to access its parent, it can call this method and peek on the second element from the top.
- Specified by:
getRenderStackin interfaceGenerator- Returns:
- the current rendering stack
- See Also:
RenderStack
-
metaOn
public <A,B> Stream<Meta<A,B>> metaOn(A from, Class<B> to)
Description copied from interface:GeneratorRenders the specified model into a stream of code models. This is used internally to provide the other interface methods.
-
transform
public <A,B> Optional<Meta<A,B>> transform(Transform<A,B> transform, A model, TransformFactory factory)
Description copied from interface:GeneratorTransforms the specified model using the specifiedTransformfrom the specifiedTransformFactory.- Specified by:
transformin interfaceGenerator- Type Parameters:
A- the input typeB- the expected output type- Parameters:
transform- the transform to usemodel- the inputed modelfactory- the factory used when instantiating the transform- Returns:
- the meta object if successful, else empty
- See Also:
Transform,TransformFactory
-
-