graveyard/tools/org/apache/axis/tools/cbindings/CBindingGenerator.java
/**
     * This method is called by the DirectoryTree with two files: the
     * input (source) file and the output (target) file. This method parses 
     * the source (header) file and writes out the C bindings to the target 
     * file. The depth is how deep in the source directory tree we are. 
     */
This method is called by the DirectoryTree with two files: the
input (source) file and the output (target) file. This method parses
the source (header) file and writes out the C bindings to the target
file. The depth is how deep in the source directory tree we are.
This method is called by the DirectoryTree with two files : the input ( source ) file and the output ( target ) file . This method parses the source ( header ) file and writes out the C bindings to the target file . The depth is how deep in the source directory tree we are .
public void actOnFile(File source, File target, int depth) throws Exception 
    {
        if (Configuration.fileExcluded(source.getName()))
            return;
        Utils.outputDebugString("parsing " + source + "...");
        String targetName = DirectoryTree.maybeAppendSeparator(target.toString());
        targetName += source.getName().substring(0, source.getName().lastIndexOf(".")) + ".h";
        FileWriter fw = new FileWriter(new File(targetName), false);
        BufferedWriter bw = new BufferedWriter(fw);
        FileReader fr = new FileReader(source);
        BufferedReader inputFile = new BufferedReader(fr);
        try 
        {
            InputCppSourceCode sourceCode = new InputCppSourceCode(inputFile, source.getName());
            generateHeader(sourceCode, bw);
        } 
        catch (ParsingException pe) 
        {
            failed = true;
        }
        bw.flush();
        bw.close();
        inputFile.close();
    }
public void actOnFile ( File source , File target , int depth ) throws Exception { if ( Configuration . fileExcluded ( source . getName ( ) ) ) return ; Utils . outputDebugString ( "parsing " + source + "..." ) ; String targetName = DirectoryTree . maybeAppendSeparator ( target . toString ( ) ) ; targetName += source . getName ( ) . substring ( 0 , source . getName ( ) . lastIndexOf ( "." ) ) + ".h" ; FileWriter fw = new FileWriter ( new File ( targetName ) , false ) ; BufferedWriter bw = new BufferedWriter ( fw ) ; FileReader fr = new FileReader ( source ) ; BufferedReader inputFile = new BufferedReader ( fr ) ; try { InputCppSourceCode sourceCode = new InputCppSourceCode ( inputFile , source . getName ( ) ) ; generateHeader ( sourceCode , bw ) ; } catch ( ParsingException pe ) { failed = true ; } bw . flush ( ) ; bw . close ( ) ; inputFile . close ( ) ; }
This method is called by the DirectoryTree with two files: the
 input (source) file and the output (target) file.
This method is called by the DirectoryTree with two files : the input ( source ) file and the output ( target ) file .