Package com.jogamp.gluegen.jcpp
Class FileLexerSource
- java.lang.Object
-
- com.jogamp.gluegen.jcpp.Source
-
- com.jogamp.gluegen.jcpp.LexerSource
-
- com.jogamp.gluegen.jcpp.InputLexerSource
-
- com.jogamp.gluegen.jcpp.FileLexerSource
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterable<Token>
public class FileLexerSource extends InputLexerSource
ASource
which lexes a file. The input is buffered.- See Also:
Source
-
-
Constructor Summary
Constructors Constructor Description FileLexerSource(File file)
Deprecated.FileLexerSource(File file, String path)
FileLexerSource(File file, Charset charset)
FileLexerSource(File file, Charset charset, String path)
Creates a new Source for lexing the given File.FileLexerSource(String path)
Deprecated.FileLexerSource(String path, Charset charset)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description File
getFile()
String
getName()
Returns the human-readable name of the current Source.String
getPath()
This is not necessarily the same as getFile().getPath() in case we are in a chroot.String
toString()
-
Methods inherited from class com.jogamp.gluegen.jcpp.LexerSource
close, getColumn, getLine, toBufferedReader, token
-
Methods inherited from class com.jogamp.gluegen.jcpp.Source
error, getParent, iterator, setListener, skipline, warning
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Constructor Detail
-
FileLexerSource
public FileLexerSource(@Nonnull File file, @Nonnull Charset charset, @Nonnull String path) throws IOException
Creates a new Source for lexing the given File. Preprocessor directives are honoured within the file.- Throws:
IOException
-
FileLexerSource
public FileLexerSource(@Nonnull File file, @Nonnull String path) throws IOException
- Throws:
IOException
-
FileLexerSource
public FileLexerSource(@Nonnull File file, @Nonnull Charset charset) throws IOException
- Throws:
IOException
-
FileLexerSource
@Deprecated public FileLexerSource(@Nonnull File file) throws IOException
Deprecated.- Throws:
IOException
-
FileLexerSource
public FileLexerSource(@Nonnull String path, @Nonnull Charset charset) throws IOException
- Throws:
IOException
-
FileLexerSource
@Deprecated public FileLexerSource(@Nonnull String path) throws IOException
Deprecated.- Throws:
IOException
-
-
Method Detail
-
getFile
@Nonnull public File getFile()
-
getPath
public String getPath()
This is not necessarily the same as getFile().getPath() in case we are in a chroot.- Overrides:
getPath
in classInputLexerSource
-
getName
public String getName()
Description copied from class:Source
Returns the human-readable name of the current Source.- Overrides:
getName
in classInputLexerSource
-
toString
public String toString()
- Overrides:
toString
in classInputLexerSource
-
-