jruby/docs BETA
Navigation
org.jruby.embed 16
E AttributeName
I EmbedEvalUnit
I EmbedRubyInstanceConfigAdapter
I EmbedRubyInterfaceAdapter
I EmbedRubyObjectAdapter
I EmbedRubyRuntimeAdapter
C EvalFailedException
A Extension
C InvokeFailedException
C IsolatedScriptingContainer
E LocalContextScope
E LocalVariableBehavior
C ParseFailedException
E PathType
E PropertyName
C ScriptingContainer
LocalContextScope — members 2+
M value_of(name) LocalContextScope
M values() LocalContextScope[]
from Enum
M compare_to(arg0) int
M declaring_class() Class<E>
M describe_constable() EnumDesc<E>>
M equals(arg0) boolean
M hash_code() int
M name() String
M ordinal() int
M to_string() String

org.jruby.embed.LocalContextScope

enum final 2 members

LocalContextState defines four scopes to maintain LocalContext.

A single ScriptingContainer can be configured to act as a facade for multiple Ruby runtimes (or really multiple Ruby VMs, since each Ruby instance is a Ruby "VM"), and this enum controls that behaviour. (this behaviour is bit like that of ThreadLocal — it changes its behaviour silently depending on the calling thread, an act of multiplexing.)

When you think of this multiplexing behaviour, there are two sets of states that need separate attention. One is Ruby instance, which represents the whole VM, classes, global variables, etc. Then there's attributes and so-called variables, which are really a special scope induced by the scripting container for better JSR-223 interop. In this documentation, we refer to the former as "the runtime" and the latter as "the variables", but the variables shouldn't be confused with the global variables in Ruby's semantics, which belongs to the runtime.

Class Methods

value_of

LocalContextScope value_of ( String name )
Java: valueOf(String name)

values

LocalContextScope[] values ( )
Java: values()

Inherited

from Enum

compare_to

int compare_to ( E arg0 )
Java: compareTo(E arg0)

declaring_class

Class<E> declaring_class ( )
Java: getDeclaringClass() · also: get_declaring_class

describe_constable

Optional<Enum.EnumDesc<E>> describe_constable ( )
Java: describeConstable()

equals

boolean equals ( Object arg0 )
Java: equals(Object arg0)

hash_code

int hash_code ( )
Java: hashCode()

name

String name ( )
Java: name()

ordinal

int ordinal ( )
Java: ordinal()

to_string

String to_string ( )
Java: toString()