Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

A Sandbox which denys access to all classes. Feather is intended to be "safe", so the default sandbox is DenyAll, and therefore if the FeatherCompiler is incorrectly initialised with an appropriate Sandbox, then safety wins (and the script will fail).

Link copied to clipboard

The simplest way to take the results of FeatherCompile, and wrap it in a ClassLoader.

Link copied to clipboard
class FeatherCompiler(val configuration: CompilerConfiguration)
Link copied to clipboard
class FeatherException(val pos: FeatherPosition, message: String) : Exception
Link copied to clipboard
data class FeatherPosition(val source: String?, val line: Int, val column: Int, val debug: Boolean)

Identifies a position within a piece of source code, most commonly to indicate the position of an error. See FeatherException. Note that line and column are zero based (i.e. the first character is line 0, column 0). The toString method adds one to the line and column to make it more human readable.

Link copied to clipboard
class FileScript(val file: File) : Script
Link copied to clipboard
Link copied to clipboard
class NullType : Type

The Type of a null literal. Note, Java does not have such a type, so we have to define our own. We could NOT use Object as the type, because for example we want to assign a null value to String variable. So whatever type "null" is, it must be auto-castable to a String (and Object is not auto-castable to a String).

Link copied to clipboard
Link copied to clipboard
interface SandBox : Cloneable
Link copied to clipboard
interface Script

If you want to compile code from a mixture of File and String, then wrap each in FileScript / StringScript, and call FeatherCompiler.compile with the list/array of Script.

Link copied to clipboard
class StaticImportDetails(val klass: Class<*>, val aliasName: String, val realName: String)
Link copied to clipboard
class StringScript(val name: String, val string: String) : Script