Package org.codehaus.commons.compiler
Class Cookable
- java.lang.Object
-
- org.codehaus.commons.compiler.Cookable
-
- All Implemented Interfaces:
ICookable
- Direct Known Subclasses:
SimpleCompiler
,SimpleCompiler
public abstract class Cookable extends Object implements ICookable
Base class for a simpleICookable
.
-
-
Field Summary
-
Fields inherited from interface org.codehaus.commons.compiler.ICookable
BOOT_CLASS_LOADER, SYSTEM_PROPERTY_SOURCE_DEBUGGING_DIR, SYSTEM_PROPERTY_SOURCE_DEBUGGING_ENABLE
-
-
Constructor Summary
Constructors Constructor Description Cookable()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
cook(InputStream is)
Reads, scans, parses and compiles Java tokens from the givenInputStream
, encoded in the "platform default encoding".void
cook(InputStream is, String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the givenInputStream
with the givenencoding
.void
cook(Reader r)
Reads, scans, parses and compiles Java tokens from the givenReader
.void
cook(String s)
Reads, scans, parses and compiles Java tokens from the givenString
.void
cook(String optionalFileName, InputStream is)
Reads, scans, parses and compiles Java tokens from the givenInputStream
, encoded in the "platform default encoding".void
cook(String optionalFileName, InputStream is, String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the givenInputStream
with the givenencoding
.abstract void
cook(String optionalFileName, Reader r)
Reads, scans, parses and compiles Java tokens from the givenReader
.void
cook(String optionalFileName, String s)
Reads, scans, parses and compiles Java tokens from the givenString
.void
cookFile(File file)
Reads, scans, parses and compiles Java tokens from the givenFile
, encoded in the "platform default encoding".void
cookFile(File file, String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the givenFile
with the givenencoding
.void
cookFile(String fileName)
Reads, scans, parses and compiles Java tokens from the named file, encoded in the "platform default encoding".void
cookFile(String fileName, String optionalEncoding)
Reads, scans, parses and compiles Java tokens from the named file with the givenoptionalEncoding
.static String
readString(Reader r)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.codehaus.commons.compiler.ICookable
setCompileErrorHandler, setDebuggingInformation, setParentClassLoader, setWarningHandler
-
-
-
-
Method Detail
-
cook
public abstract void cook(String optionalFileName, Reader r) throws CompileException, IOException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the givenReader
.- Specified by:
cook
in interfaceICookable
- Parameters:
optionalFileName
- Used when reporting errors and warnings.- Throws:
CompileException
IOException
- See Also:
ICookable.cook(String, Reader)
-
cook
public final void cook(Reader r) throws CompileException, IOException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the givenReader
.- Specified by:
cook
in interfaceICookable
- Throws:
CompileException
IOException
- See Also:
ICookable.cook(Reader)
-
cook
public final void cook(InputStream is) throws CompileException, IOException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the givenInputStream
, encoded in the "platform default encoding".- Specified by:
cook
in interfaceICookable
- Throws:
CompileException
IOException
- See Also:
ICookable.cook(InputStream)
-
cook
public final void cook(String optionalFileName, InputStream is) throws CompileException, IOException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the givenInputStream
, encoded in the "platform default encoding".- Specified by:
cook
in interfaceICookable
- Parameters:
optionalFileName
- Used when reporting errors and warnings.- Throws:
CompileException
IOException
- See Also:
ICookable.cook(String, InputStream)
-
cook
public final void cook(InputStream is, String optionalEncoding) throws CompileException, IOException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the givenInputStream
with the givenencoding
.- Specified by:
cook
in interfaceICookable
- Throws:
CompileException
IOException
- See Also:
ICookable.cook(InputStream, String)
-
cook
public final void cook(String optionalFileName, InputStream is, String optionalEncoding) throws CompileException, IOException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the givenInputStream
with the givenencoding
.- Specified by:
cook
in interfaceICookable
- Parameters:
optionalFileName
- Used when reporting errors and warnings.- Throws:
CompileException
IOException
- See Also:
ICookable.cook(String, InputStream, String)
-
cook
public void cook(String s) throws CompileException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the givenString
.- Specified by:
cook
in interfaceICookable
- Throws:
CompileException
- See Also:
ICookable.cook(String)
-
cook
public void cook(String optionalFileName, String s) throws CompileException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the givenString
.- Specified by:
cook
in interfaceICookable
- Parameters:
optionalFileName
- Used when reporting errors and warnings.- Throws:
CompileException
- See Also:
ICookable.cook(String, String)
-
cookFile
public final void cookFile(File file) throws CompileException, IOException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the givenFile
, encoded in the "platform default encoding".- Specified by:
cookFile
in interfaceICookable
- Throws:
CompileException
IOException
- See Also:
ICookable.cookFile(File)
-
cookFile
public final void cookFile(File file, String optionalEncoding) throws CompileException, IOException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the givenFile
with the givenencoding
.- Specified by:
cookFile
in interfaceICookable
- Throws:
CompileException
IOException
- See Also:
ICookable.cookFile(File, String)
-
cookFile
public final void cookFile(String fileName) throws CompileException, IOException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the named file, encoded in the "platform default encoding".- Specified by:
cookFile
in interfaceICookable
- Throws:
CompileException
IOException
- See Also:
ICookable.cookFile(String)
-
cookFile
public final void cookFile(String fileName, String optionalEncoding) throws CompileException, IOException
Description copied from interface:ICookable
Reads, scans, parses and compiles Java tokens from the named file with the givenoptionalEncoding
.- Specified by:
cookFile
in interfaceICookable
- Throws:
CompileException
IOException
- See Also:
ICookable.cookFile(String, String)
-
readString
public static String readString(Reader r) throws IOException
- Throws:
IOException
-
-