Class IdlPreprocessorReader
- java.lang.Object
-
- java.io.Reader
-
- org.apache.cxf.tools.corba.idlpreprocessor.IdlPreprocessorReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable,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.
-
-
Constructor Summary
Constructors Constructor Description IdlPreprocessorReader(URL startURL, String startLocation, IncludeResolver resolver, DefineState state)Creates a new IncludeReader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()StringgetPragmaPrefix()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 Detail
-
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 Detail
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein classReader- Throws:
IOException- See Also:
Reader.close()
-
read
public int read(char[] cbuf, int off, int len) throws IOException- Specified by:
readin classReader- Throws:
IOException- See Also:
Reader.read(char[], int, int)
-
read
public int read() throws IOException- Overrides:
readin classReader- Throws:
IOException- See Also:
Reader.read()
-
setPragmaPrefix
public void setPragmaPrefix(String pragmaPrefix)
-
getPragmaPrefix
public String getPragmaPrefix()
-
-