org.apache.cxf.tools.corba.idlpreprocessor
Class IdlPreprocessorReader
java.lang.Object
java.io.Reader
org.apache.cxf.tools.corba.idlpreprocessor.IdlPreprocessorReader
- All Implemented Interfaces:
- Closeable, Readable
public final class IdlPreprocessorReader
- extends Reader
A Reader that implements the #include functionality of the preprocessor.
Starting from one URL, it generates one stream of characters by tracking
#defines, #ifdefs, etc. and following #includes accordingly.
This reader augments the stream with
location information when the source URL is switched.
This improves error reporting (with correct file and linenumber information) in the
subsequent compilation steps like IDL parsing and also allows the implentation
of code generation options like the -emitAll flag available in the JDK idlj tool.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdlPreprocessorReader
public IdlPreprocessorReader(URL startURL,
String startLocation,
IncludeResolver resolver,
DefineState state)
throws IOException
- Creates a new IncludeReader.
- Parameters:
startURL
- startLocation
- includeResolver
- defineState
-
- Throws:
IOException
close
public void close()
throws IOException
- Specified by:
close
in interface Closeable
- Specified by:
close
in class Reader
- Throws:
IOException
- See Also:
Reader.close()
read
public int read(char[] cbuf,
int off,
int len)
throws IOException
- Specified by:
read
in class Reader
- Throws:
IOException
- See Also:
Reader.read(char[], int, int)
read
public int read()
throws IOException
- Overrides:
read
in class Reader
- Throws:
IOException
- See Also:
Reader.read()
setPragmaPrefix
public void setPragmaPrefix(String pragmaPrefix)
getPragmaPrefix
public String getPragmaPrefix()
Apache CXF