Interface CodegenWriterFactory<T extends CodegenWriter<T,?>>
- 
- Type Parameters:
 T- Type ofCodegenWriterto create.
- All Superinterfaces:
 java.util.function.BiFunction<java.lang.String,java.lang.String,T>
- Functional Interface:
 - This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
 
@FunctionalInterface public interface CodegenWriterFactory<T extends CodegenWriter<T,?>> extends java.util.function.BiFunction<java.lang.String,java.lang.String,T>Factory used to create aCodegenWriter.The following example shows how to implement a basic
CodegenWriterFactory.public final class MyWriterFactory implements CodegenWriterFactory<MyWriter> { \@Override public MyWriter apply(String filename, String namespace) { return new MyWriter(namespace); } }Because
CodegenWriterFactoryis aFunctionalInterface, it can be implemented using a lambda expression:CodegenWriterFactory<MyWriter> = (filename, namespace) -> new MyWriter(namespace); 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Tapply(java.lang.String filename, java.lang.String namespace)Creates aCodegenWriterof typeTfor the given filename and namespace. 
 - 
 
- 
- 
Method Detail
- 
apply
T apply(java.lang.String filename, java.lang.String namespace)
Creates aCodegenWriterof typeTfor the given filename and namespace.- Specified by:
 applyin interfacejava.util.function.BiFunction<java.lang.String,java.lang.String,T extends CodegenWriter<T,?>>- Parameters:
 filename- Non-null filename of the writer being created.namespace- Non-null namespace associated with the file (possibly empty string).- Returns:
 - Returns the created writer of type 
T. 
 
 - 
 
 -