com.cedarsoft.codegen
Class MemoryCodeWriter

java.lang.Object
  extended by com.sun.codemodel.CodeWriter
      extended by com.cedarsoft.codegen.MemoryCodeWriter

public class MemoryCodeWriter
extends com.sun.codemodel.CodeWriter

Author:
Johannes Schneider (js@cedarsoft.com)

Constructor Summary
MemoryCodeWriter()
           
 
Method Summary
 String allFilesToString()
           
 void close()
           
 String getFileContent(String packageName, String fileName)
           
 Map<String,ByteArrayOutputStream> getFiles()
           
 OutputStream openBinary(com.sun.codemodel.JPackage pkg, String fileName)
           
 
Methods inherited from class com.sun.codemodel.CodeWriter
openSource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MemoryCodeWriter

public MemoryCodeWriter()
Method Detail

openBinary

public OutputStream openBinary(com.sun.codemodel.JPackage pkg,
                               String fileName)
                        throws IOException
Specified by:
openBinary in class com.sun.codemodel.CodeWriter
Throws:
IOException

getFiles

@NotNull
public Map<String,ByteArrayOutputStream> getFiles()

getFileContent

@NotNull
public String getFileContent(@NotNull@NonNls
                                     String packageName,
                                     @NotNull@NonNls
                                     String fileName)

close

public void close()
           throws IOException
Specified by:
close in class com.sun.codemodel.CodeWriter
Throws:
IOException

allFilesToString

@NotNull
@NonNls
public String allFilesToString()


Copyright © 2010 cedarsoft GmbH. All Rights Reserved.