Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle TopLink
11g Release 1 (11.1.1)

E28847-01


org.eclipse.persistence.sdo.helper
Class FileCodeWriter

java.lang.Object
  extended by org.eclipse.persistence.sdo.helper.FileCodeWriter

All Implemented Interfaces:
CodeWriter

public class FileCodeWriter
extends java.lang.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

Field Summary
private static java.lang.String fsep
           
private  java.lang.String sourceDir
          The source directory to write the generated files to.

 

Constructor Summary
FileCodeWriter()
           

 

Method Summary
 java.lang.String getSourceDir()
          Sets the sourceDir variable.
 void setSourceDir(java.lang.String sourceDir)
          Sets the sourceDir variable.
 void writeFile(java.lang.String dir, java.lang.String filename, java.lang.StringBuffer content)
          Called by both writeInterface and writeImpl
 void writeImpl(java.lang.String dir, java.lang.String filename, java.lang.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(java.lang.String dir, java.lang.String filename, java.lang.StringBuffer content)
          Called from org.eclipse.persistence.sdo.helper.SDOClassGenerator for each generated interface if a CodeWriter was passed into the generate method.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

fsep

private static final java.lang.String fsep

sourceDir

private java.lang.String sourceDir
The source directory to write the generated files to. This will be prepended to the package.

Constructor Detail

FileCodeWriter

public FileCodeWriter()

Method Detail

writeInterface

public void writeInterface(java.lang.String dir,
                           java.lang.String filename,
                           java.lang.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 interface CodeWriter
Parameters:
dir - The directory corresponding to the package of the generated source file
filename - The name of the generated source file including the .java extension
content - StringBuffer containing the contents of the generated interface.

writeImpl

public void writeImpl(java.lang.String dir,
                      java.lang.String filename,
                      java.lang.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 interface CodeWriter
Parameters:
dir - The directory corresponding to the package of the generated source file
filename - The name of the generated source file including the .java extension
content - StringBuffer containing the contents of the generated implementation class.

writeFile

public void writeFile(java.lang.String dir,
                      java.lang.String filename,
                      java.lang.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 extension
content - StringBuffer containing the contents of the generate Java file

setSourceDir

public void setSourceDir(java.lang.String sourceDir)
Sets the sourceDir variable.
Parameters:
sourceDir -

getSourceDir

public java.lang.String getSourceDir()
Sets the sourceDir variable.
Parameters:
The - specified source directory. This will be prepended to the package.

Skip navigation links

Copyright © 1998, 2012, Oracle. All Rights Reserved.