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

E13403-03

oracle.ide.util.macro
Class FileMacroConverter

java.lang.Object
  extended by oracle.ide.util.macro.FileMacroConverter
All Implemented Interfaces:
MacroConverter

public class FileMacroConverter
extends java.lang.Object
implements MacroConverter

FileMacroConverter - converts macros a file at a time. This file uses a source file (i.e. Template), a destination file, and a Map of macros (macro name/value pair). The files can be a Reader/Writer or a File object.

Since:
5.0
See Also:
File, Reader, Writer, java.util.Map;

Field Summary
 
Fields inherited from interface oracle.ide.util.macro.MacroConverter
AT_CONVERTER, BATCH_CONVERTER, MAKE_CONVERTER, SHELL_CONVERTER
 
Method Summary
 boolean expandFile(java.io.File src, java.io.File dest, java.util.Map macros)
          Expands the macros in a file.
 boolean expandFile(java.io.File src, java.io.Writer dest, java.util.Map macros)
          Expands the macros in a file.
 boolean expandFile(java.io.Reader src, java.io.Writer dest, java.util.Map macros)
          Expands the macros in a file.
static FileMacroConverter getConverter(int converterType)
          Factory method to obtain an instance of FileMacroConverter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

expandFile

public boolean expandFile(java.io.File src,
                          java.io.Writer dest,
                          java.util.Map macros)
Expands the macros in a file. The src is copied to the dest expanding the macros listed in the macros map.

Note: This method will close the Writer after it uses it.

Parameters:
src - - Source File
dest - - Desitination file
macros - - name/value pair of the macros to expand

expandFile

public boolean expandFile(java.io.File src,
                          java.io.File dest,
                          java.util.Map macros)
Expands the macros in a file. The src is copied to the dest expanding the macros listed in the macros map.

Parameters:
src - - Source File
dest - - Desitination file
macros - - name/value pair of the macros to expand

expandFile

public boolean expandFile(java.io.Reader src,
                          java.io.Writer dest,
                          java.util.Map macros)
Expands the macros in a file. The src is copied to the dest expanding the macros listed in the macros map.

Note: This method will close the Writer after it uses it.

Parameters:
src - - Source File
dest - - Desitination file
macros - - name/value pair of the macros to expand

getConverter

public static FileMacroConverter getConverter(int converterType)
Factory method to obtain an instance of FileMacroConverter.

Parameters:
converterType - - Type of converter to use. The types are defined as static constants in the MacroConverter interface.

Returns:
Instance of FileMacroConverter

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

E13403-03

Copyright © 1997, 2009, Oracle. All rights reserved.