Class Cookable
java.lang.Object
org.codehaus.commons.compiler.Cookable
- All Implemented Interfaces:
ICookable
- Direct Known Subclasses:
ClassBodyEvaluator, ClassBodyEvaluator, MultiCookable, SimpleCompiler, SimpleCompiler
Base class for a simple
ICookable.
Basically, it implements all those cook() convewnience methods, and leaves only cook(String, Reader) unimplemented.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidcook(InputStream is) Reads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".final voidcook(InputStream is, String encoding) Reads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.final voidReads, scans, parses and compiles Java tokens from the givenReader.final voidReads, scans, parses and compiles Java tokens from the givenString.final voidcook(String fileName, InputStream is) Reads, scans, parses and compiles Java tokens from the givenInputStream, encoded in the "platform default encoding".final voidcook(String fileName, InputStream is, String encoding) Reads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.abstract voidReads, scans, parses and compiles Java tokens from the givenReader.final voidReads, scans, parses and compiles Java tokens from the givenString.final voidReads, scans, parses and compiles Java tokens from the givenFile, encoded in the "platform default encoding".final voidReads, scans, parses and compiles Java tokens from the givenFilewith the givenencoding.final voidReads, scans, parses and compiles Java tokens from the named file, encoded in the "platform default encoding".final voidReads, scans, parses and compiles Java tokens from the named file with the given encoding.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ICookable
getBytecodes, setSourceVersion, setTargetVersion
-
Constructor Details
-
Cookable
public Cookable()
-
-
Method Details
-
cook
public abstract void cook(@Nullable String fileName, Reader reader) throws CompileException, IOException Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenReader.- Specified by:
cookin interfaceICookable- Parameters:
fileName- Used when reporting errors and warnings- Throws:
CompileExceptionIOException
-
cook
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenReader.- Specified by:
cookin interfaceICookable- Throws:
CompileExceptionIOException
-
cook
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
-
cook
public final void cook(@Nullable String fileName, 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:
fileName- Used when reporting errors and warnings- Throws:
CompileExceptionIOException
-
cook
public final void cook(InputStream is, @Nullable String encoding) 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
-
cook
public final void cook(@Nullable String fileName, InputStream is, @Nullable String encoding) throws CompileException, IOException Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenInputStreamwith the givenencoding.- Specified by:
cookin interfaceICookable- Parameters:
fileName- Used when reporting errors and warnings- Throws:
CompileExceptionIOException
-
cook
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenString.- Specified by:
cookin interfaceICookable- Throws:
CompileException
-
cook
Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the givenString.- Specified by:
cookin interfaceICookable- Parameters:
fileName- Used when reporting errors and warnings- Throws:
CompileException
-
cookFile
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
-
cookFile
public final void cookFile(File file, @Nullable String encoding) 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
-
cookFile
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
-
cookFile
public final void cookFile(String fileName, @Nullable String encoding) throws CompileException, IOException Description copied from interface:ICookableReads, scans, parses and compiles Java tokens from the named file with the given encoding.- Specified by:
cookFilein interfaceICookable- Throws:
CompileExceptionIOException
-