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 voidcook(InputStream is)Reads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".voidcook(InputStream is, String optionalEncoding)Reads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.voidcook(Reader r)Reads, scans, parses and compiles Java tokens from the givenReader.voidcook(String s)Reads, scans, parses and compiles Java tokens from the givenString.voidcook(String optionalFileName, InputStream is)Reads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".voidcook(String optionalFileName, InputStream is, String optionalEncoding)Reads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.abstract voidcook(String optionalFileName, Reader r)Reads, scans, parses and compiles Java tokens from the givenReader.voidcook(String optionalFileName, String s)Reads, scans, parses and compiles Java tokens from the givenString.voidcookFile(File file)Reads, scans, parses and compiles Java tokens from the givenFile, encoded in the "platform default encoding".voidcookFile(File file, String optionalEncoding)Reads, scans, parses and compiles Java tokens from the givenFilewith the givenencoding.voidcookFile(String fileName)Reads, scans, parses and compiles Java tokens from the named file, encoded in the "platform default encoding".voidcookFile(String fileName, String optionalEncoding)Reads, scans, parses and compiles Java tokens from the named file with the givenoptionalEncoding.static StringreadString(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:ICookableReads, scans, parses and compiles Java tokens from the givenReader.- Specified by:
cookin interfaceICookable- Parameters:
optionalFileName- Used when reporting errors and warnings.- Throws:
CompileExceptionIOException- See Also:
ICookable.cook(String, Reader)
-
cook
public final void cook(Reader r) throws CompileException, IOException
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenReader.- Specified by:
cookin interfaceICookable- Throws:
CompileExceptionIOException- See Also:
ICookable.cook(Reader)
-
cook
public final void cook(InputStream is) throws CompileException, IOException
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".- Specified by:
cookin interfaceICookable- Throws:
CompileExceptionIOException- See Also:
ICookable.cook(InputStream)
-
cook
public final void cook(String optionalFileName, InputStream is) throws CompileException, IOException
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".- Specified by:
cookin interfaceICookable- Parameters:
optionalFileName- Used when reporting errors and warnings.- Throws:
CompileExceptionIOException- See Also:
ICookable.cook(String, InputStream)
-
cook
public final void cook(InputStream is, String optionalEncoding) throws CompileException, IOException
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.- Specified by:
cookin interfaceICookable- Throws:
CompileExceptionIOException- See Also:
ICookable.cook(InputStream, String)
-
cook
public final void cook(String optionalFileName, InputStream is, String optionalEncoding) throws CompileException, IOException
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.- Specified by:
cookin interfaceICookable- Parameters:
optionalFileName- Used when reporting errors and warnings.- Throws:
CompileExceptionIOException- See Also:
ICookable.cook(String, InputStream, String)
-
cook
public void cook(String s) throws CompileException
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenString.- Specified by:
cookin interfaceICookable- Throws:
CompileException- See Also:
ICookable.cook(String)
-
cook
public void cook(String optionalFileName, String s) throws CompileException
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenString.- Specified by:
cookin 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:ICookableReads, scans, parses and compiles Java tokens from the givenFile, encoded in the "platform default encoding".- Specified by:
cookFilein interfaceICookable- Throws:
CompileExceptionIOException- See Also:
ICookable.cookFile(File)
-
cookFile
public final void cookFile(File file, String optionalEncoding) throws CompileException, IOException
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenFilewith the givenencoding.- Specified by:
cookFilein interfaceICookable- Throws:
CompileExceptionIOException- See Also:
ICookable.cookFile(File, String)
-
cookFile
public final void cookFile(String fileName) throws CompileException, IOException
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the named file, encoded in the "platform default encoding".- Specified by:
cookFilein interfaceICookable- Throws:
CompileExceptionIOException- See Also:
ICookable.cookFile(String)
-
cookFile
public final void cookFile(String fileName, String optionalEncoding) throws CompileException, IOException
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the named file with the givenoptionalEncoding.- Specified by:
cookFilein interfaceICookable- Throws:
CompileExceptionIOException- See Also:
ICookable.cookFile(String, String)
-
readString
public static String readString(Reader r) throws IOException
- Throws:
IOException
-
-