org.jruby.embed
Enum PropertyName

java.lang.Object
  extended by java.lang.Enum<PropertyName>
      extended by org.jruby.embed.PropertyName
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<PropertyName>

public enum PropertyName
extends java.lang.Enum<PropertyName>

Predefined keys of System properties to get configurations

Author:
Yoko Harada

Enum Constant Summary
CLASSLOADER
          A key to get/set the value for classloader policy.
CLASSPATH
          A key used to get/set classpath setting.
COMPATVERSION
          A key to get/set compatible version to Ruby.
COMPILEMODE
          A key to get/set compile mode.
LAZINESS
          A key to get/set variables/constants retrieval policy.
LOCALCONTEXT_SCOPE
          A key to get/set local context scope.
LOCALVARIABLE_BEHAVIOR
          A key to get/set local variable behavior.
 
Method Summary
static PropertyName getType(java.lang.String fqpn)
          Returns a fully qualified property name that corresponds to a given enumerated type identifier.
 java.lang.String toString()
          Returns the fully qualified property name of this enum constant.
static PropertyName valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static PropertyName[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

CLASSPATH

public static final PropertyName CLASSPATH
A key used to get/set classpath setting. The key is equivalent to a System property, org.jruby.embed.class.path.


LOCALCONTEXT_SCOPE

public static final PropertyName LOCALCONTEXT_SCOPE
A key to get/set local context scope. The key is equivalent to a System property, org.jruby.embed.localcontext.scope. The assigned value must be one of threadsafe, singlethread, or singleton.


LOCALVARIABLE_BEHAVIOR

public static final PropertyName LOCALVARIABLE_BEHAVIOR
A key to get/set local variable behavior. The key is equivalent to a System property, org.jruby.embed.localvariable.behavior. The assigned value must be one of transient, persistent, or global for Embed Core and JSR223. BSF can choose bsf only.


LAZINESS

public static final PropertyName LAZINESS
A key to get/set variables/constants retrieval policy. The key is equivalent to a System property, org.jruby.embed.laziness. The assigned value must be true or false. When true is given, ScriptingContainer retrieve variables/constants from Ruby runtime lazily. When a variable or constant is requested from user program, ScriptingConainer actually attemps to get it. However, on JSR223, retrieval is done at the end of evaluation based on keys listed in Bindings.


CLASSLOADER

public static final PropertyName CLASSLOADER
A key to get/set the value for classloader policy. The key is equivalent to a System property, org.jruby.embed.classloader. The assigned value must be "current" or "none." When current is set, JSR223 engine sets a current classloader (the one used to initialize ScriptingContainer) to Ruby runtime. When none is set, no classloader is set to Ruby runtime. Default value is "none" for version 1.5.x, and "current" for 1.6.0 and later. This property is used only for JSR223 since ScriptingContainer users can set any classloader explicitely.


COMPILEMODE

public static final PropertyName COMPILEMODE
A key to get/set compile mode. The key is equivalent to a System property, org.jruby.embed.compilemode. The assigned value must be jit or force.


COMPATVERSION

public static final PropertyName COMPATVERSION
A key to get/set compatible version to Ruby. The key is equivalent to a System property, org.jruby.embed.compat.version. If the assigned value matches j?ruby1[\\._]?9, then Ruby 1.9 mode will be used to evaluate a given code.

Method Detail

values

public static PropertyName[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PropertyName c : PropertyName.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PropertyName valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

toString

public java.lang.String toString()
Returns the fully qualified property name of this enum constant.

Overrides:
toString in class java.lang.Enum<PropertyName>
Returns:
a fully qualified property name

getType

public static PropertyName getType(java.lang.String fqpn)
Returns a fully qualified property name that corresponds to a given enumerated type identifier.

Parameters:
fqan - fully qualified property name
Returns:
a matched enumerated type identifier


Copyright © 2002-2009 JRuby Team. All Rights Reserved.