org.apache.cxf.tools.corba.idlpreprocessor
Class IdlPreprocessorReader
java.lang.Object
java.io.Reader
org.apache.cxf.tools.corba.idlpreprocessor.IdlPreprocessorReader
- All Implemented Interfaces:
- java.io.Closeable, java.lang.Readable
public final class IdlPreprocessorReader
- extends java.io.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.
Fields inherited from class java.io.Reader |
lock |
Method Summary |
void |
close()
|
int |
read()
|
int |
read(char[] cbuf,
int off,
int len)
|
Methods inherited from class java.io.Reader |
mark, markSupported, read, read, ready, reset, skip |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IdlPreprocessorReader
public IdlPreprocessorReader(java.net.URL startURL,
java.lang.String startLocation,
IncludeResolver resolver,
DefineState state)
throws java.io.IOException
- Creates a new IncludeReader.
- Parameters:
startURL
- startLocation
- includeResolver
- defineState
-
- Throws:
java.io.IOException
close
public void close()
throws java.io.IOException
- Specified by:
close
in interface java.io.Closeable
- Specified by:
close
in class java.io.Reader
- Throws:
java.io.IOException
- See Also:
Reader.close()
read
public int read(char[] cbuf,
int off,
int len)
throws java.io.IOException
- Specified by:
read
in class java.io.Reader
- Throws:
java.io.IOException
- See Also:
Reader.read(char[], int, int)
read
public int read()
throws java.io.IOException
- Overrides:
read
in class java.io.Reader
- Throws:
java.io.IOException
- See Also:
Reader.read()
Apache CXF