Skip navigation links
A B C D E F G H I J L M N P R S T U V W 

A

add(ResourceLoader) - Method in interface io.purplejs.core.resource.ResourceLoaderBuilder
 
addResource(String, String) - Method in class io.purplejs.core.mock.MockResourceLoader
 
addResource(String, byte[]) - Method in class io.purplejs.core.mock.MockResourceLoader
 
addResource(ResourcePath, String) - Method in class io.purplejs.core.mock.MockResourceLoader
 
addResource(ResourcePath, byte[]) - Method in class io.purplejs.core.mock.MockResourceLoader
 
array() - Method in interface io.purplejs.core.json.JsonGenerator
Creates an array and adds it.
array(String) - Method in interface io.purplejs.core.json.JsonGenerator
Creates an array and adds it to the parent map.
asMap() - Method in interface io.purplejs.core.settings.Settings
 

B

build() - Method in interface io.purplejs.core.EngineBuilder
Builds a new instance of engine.
build() - Method in class io.purplejs.core.exception.ProblemException.Builder
Builds the exception.
build() - Method in interface io.purplejs.core.registry.RegistryBuilder
Build the registry based on the user configuration.
build() - Method in interface io.purplejs.core.resource.ResourceLoaderBuilder
 
build() - Method in interface io.purplejs.core.settings.SettingsBuilder
 

C

call(Object...) - Method in interface io.purplejs.core.value.ScriptValue
Call this function if it's a function.
callLine(String, int) - Method in class io.purplejs.core.exception.ProblemException.Builder
Add a call-line to the call-stack.
cause(Throwable) - Method in class io.purplejs.core.exception.ProblemException.Builder
Sets the cause of the exception (if any).
classLoader(ClassLoader) - Method in interface io.purplejs.core.EngineBuilder
Sets the classloader to use for creating new instances in the script engine.
configure(EngineBinder) - Method in interface io.purplejs.core.EngineModule
Do the configuration by using the provided binder.

D

debug(String, Object...) - Method in interface io.purplejs.core.context.ScriptLogger
Log debug message.
devSourceDir(File) - Method in interface io.purplejs.core.EngineBuilder
Sets where the script sources exists.
dispose() - Method in interface io.purplejs.core.Engine
Disposes of all engine resources and executes all registered disposers.
disposer(Runnable) - Method in interface io.purplejs.core.context.ExecutionContext
Adds a new disposer.
disposer(Consumer<Engine>) - Method in interface io.purplejs.core.EngineBinder
Binds a disposer that is executed when the engine is disposed or if the script cache is expired.

E

end() - Method in interface io.purplejs.core.json.JsonGenerator
End a map or array.
Engine - Interface in io.purplejs.core
This is the Engine and is used for executing the javascript code.
EngineBinder - Interface in io.purplejs.core
This class is used to bind configuration values to the engine.
EngineBuilder - Interface in io.purplejs.core
This is a builder of engines.
EngineModule - Interface in io.purplejs.core
Engine module is used for configure the engine.
Environment - Interface in io.purplejs.core
The environment holds all engine configurations that was used to build the engine.
equals(Object) - Method in class io.purplejs.core.resource.ResourcePath
 
error(String, Object...) - Method in interface io.purplejs.core.context.ScriptLogger
Log error message.
ExceptionHelper - Class in io.purplejs.core.exception
 
ExceptionHelper() - Constructor for class io.purplejs.core.exception.ExceptionHelper
 
executeMethod(String, Object...) - Method in interface io.purplejs.core.value.ScriptExports
Executes a method with optional arguments.
ExecutionContext - Interface in io.purplejs.core.context
This object is available as a global javascript object (__ - double underscore).
exists(ResourcePath) - Method in interface io.purplejs.core.resource.ResourceLoader
 

F

from(File) - Method in interface io.purplejs.core.resource.ResourceLoaderBuilder
 
from(ClassLoader) - Method in interface io.purplejs.core.resource.ResourceLoaderBuilder
 
from(ClassLoader, String) - Method in interface io.purplejs.core.resource.ResourceLoaderBuilder
 
from(String) - Static method in class io.purplejs.core.resource.ResourcePath
 

G

get() - Static method in enum io.purplejs.core.RunMode
Returns the current run-mode.
get(String) - Method in interface io.purplejs.core.settings.Settings
 
get(Class<T>, String) - Method in interface io.purplejs.core.settings.Settings
 
get(Class<T>, String, Function<String, T>) - Method in interface io.purplejs.core.settings.Settings
 
getArray() - Method in interface io.purplejs.core.value.ScriptValue
Returns the value as array.
getAsArray(String) - Method in interface io.purplejs.core.settings.Settings
 
getAsArray(Class<T>, String) - Method in interface io.purplejs.core.settings.Settings
 
getAsArray(Class<T>, String, Function<String, T>) - Method in interface io.purplejs.core.settings.Settings
 
getAsSettings(String) - Method in interface io.purplejs.core.settings.Settings
 
getBytes() - Method in class io.purplejs.core.mock.MockResource
 
getBytes() - Method in interface io.purplejs.core.resource.Resource
 
getCallStack() - Method in exception io.purplejs.core.exception.ProblemException
Stack of method calls where the problem occurred.
getClassLoader() - Method in interface io.purplejs.core.Environment
Returns the configured classloader.
getDevSourceDirs() - Method in interface io.purplejs.core.Environment
Returns a list of all development source directories.
getEngine() - Method in interface io.purplejs.core.context.ExecutionContext
Returns the engine instance.
getEnvironment() - Method in interface io.purplejs.core.context.ExecutionContext
Returns the script environment.
getExtension() - Method in class io.purplejs.core.resource.ResourcePath
 
getInnerError() - Method in exception io.purplejs.core.exception.ProblemException
Returns the inner problem exception if nested.
getInstance(String) - Method in interface io.purplejs.core.context.ExecutionContext
Returns an instance of the specified component from the registry.
getInstance(Class<T>) - Method in interface io.purplejs.core.registry.Registry
Returns a singleton instance of the supplied type.
getInstanceOrNull(String) - Method in interface io.purplejs.core.context.ExecutionContext
Returns an instance of the specified component from the registry.
getInstanceOrNull(Class<T>) - Method in interface io.purplejs.core.registry.Registry
Returns a singleton instance of the supplied type.
getKeys() - Method in interface io.purplejs.core.value.ScriptValue
Returns the object keys if this value is object.
getLastModified() - Method in class io.purplejs.core.mock.MockResource
 
getLastModified() - Method in interface io.purplejs.core.resource.Resource
 
getLineNumber() - Method in exception io.purplejs.core.exception.ProblemException
Returns the line-number where the problem occurred.
getLogger() - Method in interface io.purplejs.core.context.ExecutionContext
Returns the script logger.
getMap() - Method in interface io.purplejs.core.value.ScriptValue
Returns the value as map.
getMember(String) - Method in interface io.purplejs.core.value.ScriptValue
Returns the named member or null.
getName() - Method in class io.purplejs.core.resource.ResourcePath
 
getNameWithoutExtension() - Method in class io.purplejs.core.resource.ResourcePath
 
getParent() - Method in class io.purplejs.core.resource.ResourcePath
 
getPath() - Method in exception io.purplejs.core.exception.ProblemException
Returns the resource path where the problem occurred.
getPath() - Method in class io.purplejs.core.mock.MockResource
 
getPath() - Method in interface io.purplejs.core.resource.Resource
 
getPath() - Method in class io.purplejs.core.resource.ResourcePath
 
getProvider(String) - Method in interface io.purplejs.core.context.ExecutionContext
Returns a provider of the specified component from the registry.
getProvider(Class<T>) - Method in interface io.purplejs.core.registry.Registry
Returns a provider of instances for the supplied type.
getRaw() - Method in interface io.purplejs.core.value.ScriptValue
Returns the raw (wrapped) object.
getRegistry() - Method in interface io.purplejs.core.context.ExecutionContext
Returns the component registry.
getResource() - Method in interface io.purplejs.core.context.ExecutionContext
Returns the actual script running.
getResource() - Method in interface io.purplejs.core.value.ScriptExports
Resource path for the script that exported the methods.
getResourceLoader() - Method in interface io.purplejs.core.Environment
Returns the configured resource-loader instance.
getSettings() - Method in interface io.purplejs.core.Environment
Returns the settings object.
getSize() - Method in class io.purplejs.core.mock.MockResource
 
getSize() - Method in interface io.purplejs.core.resource.Resource
 
getValue() - Method in interface io.purplejs.core.value.ScriptExports
Exported object as a value.
getValue() - Method in interface io.purplejs.core.value.ScriptValue
Returns the value if it's type value.
getValue(Class<T>) - Method in interface io.purplejs.core.value.ScriptValue
Returns the value if the type is value and converts it.
globalVariable(String, Object) - Method in interface io.purplejs.core.EngineBinder
Adds a global variable to the script engine.

H

hashCode() - Method in class io.purplejs.core.resource.ResourcePath
 
hasMember(String) - Method in interface io.purplejs.core.value.ScriptValue
Returns true if it has a member by specified name.
hasMethod(String) - Method in interface io.purplejs.core.value.ScriptExports
Returns true if it has a method by the specified name, false otherwise.

I

info(String, Object...) - Method in interface io.purplejs.core.context.ScriptLogger
Log info message.
init() - Static method in enum io.purplejs.core.RunMode
Initializes the run-mode based on system-properties.
initializer(Consumer<Engine>) - Method in interface io.purplejs.core.EngineBinder
Binds an initializer that is executed when the engine is created.
instance(Class<T>, T) - Method in interface io.purplejs.core.EngineBinder
Binds an instance to a type.
instance(Class<T>, T) - Method in interface io.purplejs.core.registry.RegistryBuilder
Binds an instance to a type.
io.purplejs.core - package io.purplejs.core
 
io.purplejs.core.context - package io.purplejs.core.context
 
io.purplejs.core.exception - package io.purplejs.core.exception
 
io.purplejs.core.json - package io.purplejs.core.json
 
io.purplejs.core.mock - package io.purplejs.core.mock
 
io.purplejs.core.registry - package io.purplejs.core.registry
 
io.purplejs.core.resource - package io.purplejs.core.resource
 
io.purplejs.core.settings - package io.purplejs.core.settings
 
io.purplejs.core.util - package io.purplejs.core.util
 
io.purplejs.core.value - package io.purplejs.core.value
 
IOHelper - Class in io.purplejs.core.util
 
IOHelper() - Constructor for class io.purplejs.core.util.IOHelper
 
isArray() - Method in interface io.purplejs.core.value.ScriptValue
Returns true if this value is an array.
isFunction() - Method in interface io.purplejs.core.value.ScriptValue
Returns true if this value is a function.
isObject() - Method in interface io.purplejs.core.value.ScriptValue
Returns true if this value is a object.
isRoot() - Method in class io.purplejs.core.resource.ResourcePath
 
isValue() - Method in interface io.purplejs.core.value.ScriptValue
Returns true if this value is a simple value.

J

JsonGenerator - Interface in io.purplejs.core.json
This interface defines a generator that produces json-like structures.
JsonSerializable - Interface in io.purplejs.core.json
This interface is used to serialize a object to a json-like structure.

L

lineNumber(int) - Method in class io.purplejs.core.exception.ProblemException.Builder
Sets the line-number.
load(ResourcePath) - Method in interface io.purplejs.core.resource.ResourceLoader
 
loadOrNull(ResourcePath) - Method in class io.purplejs.core.mock.MockResourceLoader
 
loadOrNull(ResourcePath) - Method in interface io.purplejs.core.resource.ResourceLoader
 

M

map() - Method in interface io.purplejs.core.json.JsonGenerator
Creates a map and adds it.
map(String) - Method in interface io.purplejs.core.json.JsonGenerator
Creates a map and adds it to the parent map.
message(String, Object...) - Method in class io.purplejs.core.exception.ProblemException.Builder
Sets the message.
MockResource - Class in io.purplejs.core.mock
 
MockResource(ResourcePath, byte[]) - Constructor for class io.purplejs.core.mock.MockResource
 
MockResourceLoader - Class in io.purplejs.core.mock
 
MockResourceLoader() - Constructor for class io.purplejs.core.mock.MockResourceLoader
 
module(EngineModule) - Method in interface io.purplejs.core.EngineBuilder
Adds a new engine-module to do more configurations.

N

newBean(String) - Method in interface io.purplejs.core.context.ExecutionContext
Constructs a new instance of the specified type.
newBuilder() - Static method in interface io.purplejs.core.EngineBuilder
Returns a new instance of this engine builder.
newBuilder() - Static method in exception io.purplejs.core.exception.ProblemException
Create a new builder for this exception type.
newBuilder() - Static method in interface io.purplejs.core.registry.RegistryBuilder
Creates a new builder of this type.
newBuilder() - Static method in interface io.purplejs.core.resource.ResourceLoaderBuilder
 
newBuilder() - Static method in interface io.purplejs.core.settings.SettingsBuilder
 
NotFoundException - Exception in io.purplejs.core.exception
This exception indicates that a resource was not found or could not be resolved.
NotFoundException(String) - Constructor for exception io.purplejs.core.exception.NotFoundException
Constructs the exception with a message.
NotFoundException(ResourcePath) - Constructor for exception io.purplejs.core.exception.NotFoundException
Constructs the exception with a resource path.

P

path(ResourcePath) - Method in class io.purplejs.core.exception.ProblemException.Builder
Sets the resource path.
ProblemException - Exception in io.purplejs.core.exception
This exception indicates a problem with one of the resources.
ProblemException.Builder - Class in io.purplejs.core.exception
This class helps build a resource problem exception.
provider(Class<T>, Supplier<T>) - Method in interface io.purplejs.core.EngineBinder
Binds a provider of a type.
provider(Class<T>, Supplier<T>) - Method in interface io.purplejs.core.registry.RegistryBuilder
Binds a provider of a type.
put(Properties) - Method in interface io.purplejs.core.settings.SettingsBuilder
 
put(Map<String, String>) - Method in interface io.purplejs.core.settings.SettingsBuilder
 
put(Settings) - Method in interface io.purplejs.core.settings.SettingsBuilder
 
put(String, Properties) - Method in interface io.purplejs.core.settings.SettingsBuilder
 
put(String, Map<String, String>) - Method in interface io.purplejs.core.settings.SettingsBuilder
 
put(String, Settings) - Method in interface io.purplejs.core.settings.SettingsBuilder
 
put(String, String) - Method in interface io.purplejs.core.settings.SettingsBuilder
 
put(String, boolean) - Method in interface io.purplejs.core.settings.SettingsBuilder
 
put(String, Number) - Method in interface io.purplejs.core.settings.SettingsBuilder
 
putArray(String, String...) - Method in interface io.purplejs.core.settings.SettingsBuilder
 

R

readLines(ByteSource) - Static method in class io.purplejs.core.util.IOHelper
 
readLines(CharSource) - Static method in class io.purplejs.core.util.IOHelper
 
readString(CharSource) - Static method in class io.purplejs.core.util.IOHelper
 
readString(ByteSource) - Static method in class io.purplejs.core.util.IOHelper
 
registerMock(String, Object) - Method in interface io.purplejs.core.context.ExecutionContext
Register a mock object to the specified path.
Registry - Interface in io.purplejs.core.registry
The registry acts as a simple map of components in the system.
RegistryBuilder - Interface in io.purplejs.core.registry
This is a builder of registries.
require(String) - Method in interface io.purplejs.core.context.ExecutionContext
Require a new javascript file or json file relative to the current file.
require(ResourcePath) - Method in interface io.purplejs.core.Engine
Executes a javascript resource and returns the exported entries (if any).
resolve(String) - Method in interface io.purplejs.core.context.ExecutionContext
Resolve a new file resource.
resolve(String) - Method in class io.purplejs.core.resource.ResourcePath
 
Resource - Interface in io.purplejs.core.resource
 
resourceLoader(ResourceLoader) - Method in interface io.purplejs.core.EngineBuilder
Sets the resource-loader to use.
ResourceLoader - Interface in io.purplejs.core.resource
 
ResourceLoaderBuilder - Interface in io.purplejs.core.resource
 
ResourcePath - Class in io.purplejs.core.resource
 
ROOT - Static variable in class io.purplejs.core.resource.ResourcePath
 
RunMode - Enum in io.purplejs.core
Run-mode is used to indicate which environment the engine is running in.

S

ScriptExports - Interface in io.purplejs.core.value
This interface defines a set of exported methods from javascript.
ScriptLogger - Interface in io.purplejs.core.context
This logger is added as a global object (log) in the Javascript environment.
ScriptValue - Interface in io.purplejs.core.value
This interface defines a script value.
serialize(JsonGenerator) - Method in interface io.purplejs.core.json.JsonSerializable
Serialize this object.
set() - Method in enum io.purplejs.core.RunMode
Set this mode as the current run-mode.
setLastModified(long) - Method in class io.purplejs.core.mock.MockResource
 
settings(Settings) - Method in interface io.purplejs.core.EngineBuilder
Add settings to this engine.
Settings - Interface in io.purplejs.core.settings
 
SettingsBuilder - Interface in io.purplejs.core.settings
 

T

toByteSource(InputStream) - Static method in class io.purplejs.core.util.IOHelper
 
toCharSource(ByteSource) - Static method in class io.purplejs.core.util.IOHelper
 
toJavaObject() - Method in interface io.purplejs.core.value.ScriptValue
Returns the value as Java object.
toJson() - Method in interface io.purplejs.core.value.ScriptValue
Returns the value as JSON.
toNativeObject(Object) - Method in interface io.purplejs.core.context.ExecutionContext
Converts a object to native javascript object.
toScriptValue(Object) - Method in interface io.purplejs.core.context.ExecutionContext
Converts a value to a script value.
toString() - Method in class io.purplejs.core.resource.ResourcePath
 

U

unchecked(Throwable) - Static method in class io.purplejs.core.exception.ExceptionHelper
Rethrows a checked exception as unchecked exception.

V

value(Object) - Method in interface io.purplejs.core.json.JsonGenerator
Adds a value to the parent.
value(String, Object) - Method in interface io.purplejs.core.json.JsonGenerator
Adds a value to the parent map.
valueOf(String) - Static method in enum io.purplejs.core.RunMode
Returns the enum constant of this type with the specified name.
values() - Static method in enum io.purplejs.core.RunMode
Returns an array containing the constants of this enum type, in the order they are declared.

W

warning(String, Object...) - Method in interface io.purplejs.core.context.ScriptLogger
Log warning message.
wrap(Callable<T>) - Static method in class io.purplejs.core.exception.ExceptionHelper
Tries to call the callable and return the result.
A B C D E F G H I J L M N P R S T U V W 
Skip navigation links