|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jruby.embed.util.SystemPropertyCatcher
public class SystemPropertyCatcher
Utility methods to retrieve System properties or environment variables to get configuration parameters.
Constructor Summary | |
---|---|
SystemPropertyCatcher()
|
Method Summary | |
---|---|
static java.lang.String |
findFromJar(java.lang.Object instance)
|
static java.lang.String |
findJRubyHome(java.lang.Object instance)
Tries to find JRuby home from the order of JRUBY_HOME environment variable, jruby.home System property, then "/META-INF/jruby.home" if jruby-complete.jar is used. |
static java.util.List<java.lang.String> |
findLoadPaths()
Tries to find load paths for ruby files and/or libraries. |
static java.lang.String |
getBaseDir()
Returns a possible base directory. |
static LocalVariableBehavior |
getBehavior(LocalVariableBehavior defaultBehavior)
Gets a local variable behavior from System property. |
static LocalContextScope |
getScope(LocalContextScope defaultScope)
Gets a local context scope from System property. |
static boolean |
isLazy(boolean defaultLaziness)
Gets a local variable behavior from System property. |
static boolean |
isRuby19(java.lang.String name)
Checks that a given name is an appropriate configuration parameter to choose Ruby 1.9 mode. |
static void |
setClassLoader(ScriptingContainer container)
Sets classloader based on System property. |
static void |
setConfiguration(ScriptingContainer container)
Sets configuration parameters given by System properties. |
static void |
setJRubyHome(ScriptingContainer container)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SystemPropertyCatcher()
Method Detail |
---|
public static LocalContextScope getScope(LocalContextScope defaultScope)
defaultScope
- a default scope.
public static LocalVariableBehavior getBehavior(LocalVariableBehavior defaultBehavior)
defaultBehavior
- a default local variable behavior
public static boolean isLazy(boolean defaultLaziness)
defaultLaziness
- a default local variable behavior
public static void setClassLoader(ScriptingContainer container)
container
- ScriptingContainer to be set classloaderpublic static void setConfiguration(ScriptingContainer container)
container
- ScriptingContainer to be set configurations.@Deprecated public static void setJRubyHome(ScriptingContainer container)
container
- ScriptingContainer to be set jruby home.public static java.lang.String findJRubyHome(java.lang.Object instance)
instance
- any instance to get a resource
public static java.lang.String findFromJar(java.lang.Object instance)
public static java.util.List<java.lang.String> findLoadPaths()
public static boolean isRuby19(java.lang.String name)
name
- a possible name that expresses Ruby 1.9.
public static java.lang.String getBaseDir()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |