org.jruby.internal.runtime.load
Class LoadService

java.lang.Object
  extended byorg.jruby.internal.runtime.load.LoadService
All Implemented Interfaces:
ILoadService

public class LoadService
extends java.lang.Object
implements ILoadService

Version:
$Revision: 1.14 $
Author:
jpetersen

Constructor Summary
LoadService(Ruby runtime)
          Constructor for LoadService.
 
Method Summary
 void addAutoload(java.lang.String name, IAutoloadMethod loadMethod)
           
 IRubyObject autoload(java.lang.String name)
           
 java.util.ArrayList getLoadedFeatures()
           
 java.util.ArrayList getLoadPath()
           
 void init(Ruby runtime, java.util.List additionalDirectories)
          Init the LOAD_PATH array.
 boolean isAutoloadDefined(java.lang.String name)
           
 boolean load(java.lang.String file)
           
 void registerBuiltin(java.lang.String name, Library library)
           
 boolean require(java.lang.String file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoadService

public LoadService(Ruby runtime)
Constructor for LoadService.

Method Detail

init

public void init(Ruby runtime,
                 java.util.List additionalDirectories)
Description copied from interface: ILoadService
Init the LOAD_PATH array. An array of strings, where each string specifies a directory to be searched for Ruby scripts and binary extensions used by the load and require methods. The initial value is the value of the arguments passed via the -I command-line option, followed by an installation-defined standard library location, followed by the current directory (``.''). This variable may be set from within a program to alter the default search path; typically, programs use $: << dir to append dir to the path.

Specified by:
init in interface ILoadService
See Also:
ILoadService.init(Ruby, List)

load

public boolean load(java.lang.String file)
Specified by:
load in interface ILoadService
See Also:
ILoadService.load(String)

require

public boolean require(java.lang.String file)
Specified by:
require in interface ILoadService
See Also:
ILoadService.require(String)

getLoadPath

public java.util.ArrayList getLoadPath()
Specified by:
getLoadPath in interface ILoadService
See Also:
ILoadService.getLoadPath()

getLoadedFeatures

public java.util.ArrayList getLoadedFeatures()
Specified by:
getLoadedFeatures in interface ILoadService
See Also:
ILoadService.getLoadedFeatures()

isAutoloadDefined

public boolean isAutoloadDefined(java.lang.String name)
Specified by:
isAutoloadDefined in interface ILoadService
See Also:
ILoadService.isAutoloadDefined(String)

autoload

public IRubyObject autoload(java.lang.String name)
Specified by:
autoload in interface ILoadService
See Also:
ILoadService.autoload(String)

addAutoload

public void addAutoload(java.lang.String name,
                        IAutoloadMethod loadMethod)
Specified by:
addAutoload in interface ILoadService
See Also:
ILoadService.addAutoload(String, IAutoloadMethod)

registerBuiltin

public void registerBuiltin(java.lang.String name,
                            Library library)
Specified by:
registerBuiltin in interface ILoadService
See Also:
ILoadService.registerBuiltin(String, Library)


Copyright © 2002 Jan Arne Petersen. All Rights Reserved.