Class FileCodeWriter
- java.lang.Object
-
- org.eclipse.persistence.sdo.helper.FileCodeWriter
-
- All Implemented Interfaces:
CodeWriter
public class FileCodeWriter extends Object implements CodeWriter
Purpose:Used in conjunction with SDOClassGenerator. FileCodeWriter will be used by default with SDOClassGenerator unless another CodeWriter is specified by the user. Writes files to the file system.
- See Also:
SDOClassGenerator
,CodeWriter
-
-
Constructor Summary
Constructors Constructor Description FileCodeWriter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getSourceDir()
Gets the sourceDir variable.void
setSourceDir(String sourceDir)
Sets the sourceDir variable.void
writeFile(String dir, String filename, StringBuffer content)
Called by both writeInterface and writeImplvoid
writeImpl(String dir, String filename, StringBuffer content)
Called from org.eclipse.persistence.sdo.helper.SDOClassGenerator for each generated interface if a CodeWriter was passed into the generate method.void
writeInterface(String dir, String filename, StringBuffer content)
Called from org.eclipse.persistence.sdo.helper.SDOClassGenerator for each generated interface if a CodeWriter was passed into the generate method.
-
-
-
Method Detail
-
writeInterface
public void writeInterface(String dir, String filename, StringBuffer content)
Called from org.eclipse.persistence.sdo.helper.SDOClassGenerator for each generated interface if a CodeWriter was passed into the generate method.
- Specified by:
writeInterface
in interfaceCodeWriter
- Parameters:
dir
- The directory corresponding to the package of the generated source filefilename
- The name of the generated source file including the .java extensioncontent
- StringBuffer containing the contents of the generated interface.
-
writeImpl
public void writeImpl(String dir, String filename, StringBuffer content)
Called from org.eclipse.persistence.sdo.helper.SDOClassGenerator for each generated interface if a CodeWriter was passed into the generate method.
- Specified by:
writeImpl
in interfaceCodeWriter
- Parameters:
dir
- The directory corresponding to the package of the generated source filefilename
- The name of the generated source file including the .java extensioncontent
- StringBuffer containing the contents of the generated implementation class.
-
writeFile
public void writeFile(String dir, String filename, StringBuffer content)
Called by both writeInterface and writeImpl
- Parameters:
dir
- The directory corresponding to the package of the generated source file param filename The name of the generated source file including the .java extensioncontent
- StringBuffer containing the contents of the generate Java file
-
setSourceDir
public void setSourceDir(String sourceDir)
Sets the sourceDir variable.- Parameters:
sourceDir
-
-
getSourceDir
public String getSourceDir()
Gets the sourceDir variable.
-
-