Package io.apicurio.hub.api.codegen.util
Class IndexedCodeWriter
- java.lang.Object
-
- com.sun.codemodel.CodeWriter
-
- io.apicurio.hub.api.codegen.util.IndexedCodeWriter
-
public class IndexedCodeWriter extends com.sun.codemodel.CodeWriter- Author:
- eric.wittmann@gmail.com
-
-
Constructor Summary
Constructors Constructor Description IndexedCodeWriter()Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()CodegenJavaBeangetBean(String className)Gets the bean for a given class name.ByteArrayOutputStreamgetContent(String className)Gets the content produced for a given class name.voidindexBean(String beanClassname, CodegenJavaBean bean)Set<String>keys()Gets the keys.OutputStreamopenBinary(com.sun.codemodel.JPackage pkg, String fileName)voidset(String className, ByteArrayOutputStream data)Updates the index with the given content.
-
-
-
Method Detail
-
openBinary
public OutputStream openBinary(com.sun.codemodel.JPackage pkg, String fileName) throws IOException
- Specified by:
openBinaryin classcom.sun.codemodel.CodeWriter- Throws:
IOException- See Also:
CodeWriter.openBinary(com.sun.codemodel.JPackage, java.lang.String)
-
close
public void close() throws IOException- Specified by:
closein classcom.sun.codemodel.CodeWriter- Throws:
IOException- See Also:
CodeWriter.close()
-
getContent
public ByteArrayOutputStream getContent(String className) throws IOException
Gets the content produced for a given class name.- Parameters:
className-- Throws:
IOException
-
getBean
public CodegenJavaBean getBean(String className)
Gets the bean for a given class name.- Parameters:
className-
-
set
public void set(String className, ByteArrayOutputStream data)
Updates the index with the given content.- Parameters:
className-data-
-
indexBean
public void indexBean(String beanClassname, CodegenJavaBean bean)
-
-