Class IdlPreprocessorReader
java.lang.Object
java.io.Reader
org.apache.cxf.tools.corba.idlpreprocessor.IdlPreprocessorReader
- All Implemented Interfaces:
Closeable,AutoCloseable,Readable
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.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionIdlPreprocessorReader(URL startURL, String startLocation, IncludeResolver resolver, DefineState state) Creates a new IncludeReader. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()intread()intread(char[] cbuf, int off, int len) voidsetPragmaPrefix(String pragmaPrefix) Methods inherited from class java.io.Reader
mark, markSupported, nullReader, read, read, ready, reset, skip, transferTo
-
Constructor Details
-
IdlPreprocessorReader
public IdlPreprocessorReader(URL startURL, String startLocation, IncludeResolver resolver, DefineState state) throws IOException Creates a new IncludeReader.- Parameters:
startURL-startLocation-resolver-state-- Throws:
IOException
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException- See Also:
-
read
- Specified by:
readin classReader- Throws:
IOException- See Also:
-
read
- Overrides:
readin classReader- Throws:
IOException- See Also:
-
setPragmaPrefix
-
getPragmaPrefix
-