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 java.lang.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(java.io.InputStream is)Reads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".voidcook(java.io.InputStream is, java.lang.String optionalEncoding)Reads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.voidcook(java.io.Reader r)Reads, scans, parses and compiles Java tokens from the givenReader.voidcook(java.lang.String s)Reads, scans, parses and compiles Java tokens from the givenString.voidcook(java.lang.String optionalFileName, java.io.InputStream is)Reads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".voidcook(java.lang.String optionalFileName, java.io.InputStream is, java.lang.String optionalEncoding)Reads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.abstract voidcook(java.lang.String optionalFileName, java.io.Reader r)Reads, scans, parses and compiles Java tokens from the givenReader.voidcook(java.lang.String optionalFileName, java.lang.String s)Reads, scans, parses and compiles Java tokens from the givenString.voidcookFile(java.io.File file)Reads, scans, parses and compiles Java tokens from the givenFile, encoded in the "platform default encoding".voidcookFile(java.io.File file, java.lang.String optionalEncoding)Reads, scans, parses and compiles Java tokens from the givenFilewith the givenencoding.voidcookFile(java.lang.String fileName)Reads, scans, parses and compiles Java tokens from the named file, encoded in the "platform default encoding".voidcookFile(java.lang.String fileName, java.lang.String optionalEncoding)Reads, scans, parses and compiles Java tokens from the named file with the givenencoding.static java.lang.StringreadString(java.io.Reader r)Reads all characters from the givenReaderinto aString.-
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
setDebuggingInformation, setParentClassLoader
-
-
-
-
Method Detail
-
cook
public abstract void cook(java.lang.String optionalFileName, java.io.Reader r) throws CompileException, java.io.IOExceptionDescription 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:
CompileExceptionjava.io.IOException- See Also:
ICookable.cook(String, Reader)
-
cook
public final void cook(java.io.Reader r) throws CompileException, java.io.IOExceptionDescription copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenReader.- Specified by:
cookin interfaceICookable- Throws:
CompileExceptionjava.io.IOException- See Also:
ICookable.cook(Reader)
-
cook
public final void cook(java.io.InputStream is) throws CompileException, java.io.IOExceptionDescription copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".- Specified by:
cookin interfaceICookable- Throws:
CompileExceptionjava.io.IOException- See Also:
ICookable.cook(InputStream)
-
cook
public final void cook(java.lang.String optionalFileName, java.io.InputStream is) throws CompileException, java.io.IOExceptionDescription 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:
CompileExceptionjava.io.IOException- See Also:
ICookable.cook(String, InputStream)
-
cook
public final void cook(java.io.InputStream is, java.lang.String optionalEncoding) throws CompileException, java.io.IOExceptionDescription copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.- Specified by:
cookin interfaceICookable- Throws:
CompileExceptionjava.io.IOException- See Also:
ICookable.cook(InputStream, String)
-
cook
public final void cook(java.lang.String optionalFileName, java.io.InputStream is, java.lang.String optionalEncoding) throws CompileException, java.io.IOExceptionDescription 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:
CompileExceptionjava.io.IOException- See Also:
ICookable.cook(String, InputStream, String)
-
cook
public void cook(java.lang.String s) throws CompileExceptionDescription 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(java.lang.String optionalFileName, java.lang.String s) throws CompileExceptionDescription 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(java.io.File file) throws CompileException, java.io.IOExceptionDescription copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenFile, encoded in the "platform default encoding".- Specified by:
cookFilein interfaceICookable- Throws:
CompileExceptionjava.io.IOException- See Also:
ICookable.cookFile(File)
-
cookFile
public final void cookFile(java.io.File file, java.lang.String optionalEncoding) throws CompileException, java.io.IOExceptionDescription copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenFilewith the givenencoding.- Specified by:
cookFilein interfaceICookable- Throws:
CompileExceptionjava.io.IOException- See Also:
ICookable.cookFile(File, String)
-
cookFile
public final void cookFile(java.lang.String fileName) throws CompileException, java.io.IOExceptionDescription 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:
CompileExceptionjava.io.IOException- See Also:
ICookable.cookFile(String)
-
cookFile
public final void cookFile(java.lang.String fileName, java.lang.String optionalEncoding) throws CompileException, java.io.IOExceptionDescription copied from interface:ICookableReads, scans, parses and compiles Java tokens from the named file with the givenencoding.- Specified by:
cookFilein interfaceICookable- Throws:
CompileExceptionjava.io.IOException- See Also:
ICookable.cookFile(String, String)
-
readString
public static java.lang.String readString(java.io.Reader r) throws java.io.IOExceptionReads all characters from the givenReaderinto aString.- Throws:
java.io.IOException
-
-