| Modifier and Type | Class and Description |
|---|---|
| public static class | |
| private static class | |
| pack-priv class | |
| private static enum | |
| public static enum | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| protected static final Pattern | |
| protected final Map | |
| protected LibrarySearcher | |
| protected StringArraySet | |
| protected RubyArray | |
| private final LoadService. | |
| pack-priv static final Logger | |
| protected String | |
| protected String | |
| pack-priv final LoadService. | |
| protected final Ruby | |
| protected static final Pattern | |
| private static final Pattern | |
| private final ThreadLocal |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected void | |
| public void | |
| public void | |
| public boolean | |
| protected void | |
| public static String | classpathFilenameFromURL(String
the original filename requested name, URL the URL to the resource loc, boolean whether we're using the classpath: sceheme isClasspathScheme)Given a URL to a classloader resource, build an appropriate load string. |
| protected Library | |
| private static void | |
| protected final void | |
| protected final void | |
| protected final void | |
| public boolean | |
| public boolean | |
| protected LoadServiceResource | Returns: the correct filethe file to find, this is a path name name)this method uses the appropriate lookup strategy to find a file. |
| protected LibrarySearcher. | |
| public LoadServiceResource | |
| public IRubyObject | |
| public IRubyObject | |
| protected String | |
| public String | |
| public String | |
| public String | |
| public RubyModule | |
| public void | |
| protected boolean | |
| protected static boolean | |
| public void | |
| public void | |
| public void | |
| public void | |
| public static void | reflectedLoad(Ruby
The runtime in which to load runtime, String The name of the library, to use for error messages libraryName, String The class of the library className, ClassLoader The classloader to use to load it classLoader, boolean Whether to wrap top-level in an anonymous module wrap)Load the org.jruby.runtime.load.Library implementation specified by className. |
| public boolean | |
| protected String | |
| protected LibrarySearcher. | |
| public char | searchForRequire(String file, LibrarySearcher.
Replaces findLibraryBySearchState but split off for require. |
| public void | |
| private LoadService. | |
| public void | |
| protected boolean | |
| protected void |
| extensionPattern | back to summary |
|---|---|
| protected static final Pattern extensionPattern | |
| jarFiles | back to summary |
|---|---|
| protected final Map<String, JarFile> jarFiles | |
| librarySearcher | back to summary |
|---|---|
| protected LibrarySearcher librarySearcher | |
| loadedFeatures | back to summary |
|---|---|
| protected StringArraySet loadedFeatures | |
| loadPath | back to summary |
|---|---|
| protected RubyArray<T extends IRubyObject> loadPath | |
| loadTimer | back to summary |
|---|---|
| private final LoadService. | |
| LOG | back to summary |
|---|---|
| pack-priv static final Logger LOG | |
| mainScript | back to summary |
|---|---|
| protected String mainScript | |
| mainScriptPath | back to summary |
|---|---|
| protected String mainScriptPath | |
| requireLocks | back to summary |
|---|---|
| pack-priv final LoadService. | |
| runtime | back to summary |
|---|---|
| protected final Ruby runtime | |
| sourcePattern | back to summary |
|---|---|
| protected static final Pattern sourcePattern | |
| URI_PATTERN | back to summary |
|---|---|
| private static final Pattern URI_PATTERN | |
| wrapperSelf | back to summary |
|---|---|
| private final ThreadLocal<RubyModule> wrapperSelf | |
| LoadService | back to summary |
|---|---|
| public LoadService(Ruby runtime) | |
| addPath | back to summary |
|---|---|
| protected void addPath(String path) | |
| addPaths | back to summary |
|---|---|
| public void addPaths(List<String> additionalDirectories) Add additional directories to the load path. | |
| addPaths | back to summary |
|---|---|
| public void addPaths(String... additionalDirectories) Add additional directories to the load path.
| |
| autoloadRequire | back to summary |
|---|---|
| public boolean autoloadRequire(RubyString requireName) | |
| checkEmptyLoad | back to summary |
|---|---|
| protected void checkEmptyLoad(String file) throws RaiseException | |
| classpathFilenameFromURL | back to summary |
|---|---|
| public static String classpathFilenameFromURL(String name, URL loc, boolean isClasspathScheme) Given a URL to a classloader resource, build an appropriate load string. | |
| createLibrary | back to summary |
|---|---|
| protected Library createLibrary(String baseName, String loadName, LoadServiceResource resource) | |
| debugLoadException | back to summary |
|---|---|
| private static void debugLoadException(final Ruby runtime, final Throwable ex) | |
| debugLogFound | back to summary |
|---|---|
| protected final void debugLogFound(LoadServiceResource resource) | |
| debugLogFound | back to summary |
|---|---|
| protected final void debugLogFound(String what, String msg) | |
| debugLogTry | back to summary |
|---|---|
| protected final void debugLogTry(String what, String msg) | |
| featureAlreadyLoaded | back to summary |
|---|---|
| public boolean featureAlreadyLoaded(String feature) | |
| featureAlreadyLoaded | back to summary |
|---|---|
| public boolean featureAlreadyLoaded(String feature, String[] loading) | |
| findFileInClasspath | back to summary |
|---|---|
| protected LoadServiceResource findFileInClasspath(String name) this method uses the appropriate lookup strategy to find a file. It is used by Kernel#require. MRI: rb_find_file
| |
| findLibraryWithClassloaders | back to summary |
|---|---|
| protected LibrarySearcher. | |
| getClassPathResource | back to summary |
|---|---|
| public LoadServiceResource getClassPathResource(ClassLoader classLoader, String name) | |
| getLoadedFeatures | back to summary |
|---|---|
| public IRubyObject getLoadedFeatures() | |
| getLoadPath | back to summary |
|---|---|
| public IRubyObject getLoadPath() | |
| getLoadPathEntry | back to summary |
|---|---|
| protected String getLoadPathEntry(IRubyObject entry) | |
| getMainScript | back to summary |
|---|---|
| public String getMainScript() | |
| getMainScriptPath | back to summary |
|---|---|
| public String getMainScriptPath() | |
| getPathForLocation | back to summary |
|---|---|
| public String getPathForLocation(String filename) | |
| getWrapperSelf | back to summary |
|---|---|
| public RubyModule getWrapperSelf() | |
| init | back to summary |
|---|---|
| public void init(List<String> prependDirectories) Called to initialize the load path with a set of optional prepended directories and then the standard set of dirs. This should only be called once, at load time, since it wipes out loaded features. | |
| isJarfileLibrary | back to summary |
|---|---|
| protected boolean isJarfileLibrary(Library library, final String file) | |
| isRequireable | back to summary |
|---|---|
| protected static boolean isRequireable(URL loc) | |
| load | back to summary |
|---|---|
| public void load(String file, IRubyObject wrapWith) | |
| load | back to summary |
|---|---|
| public void load(String file, boolean wrap) | |
| loadFromClassLoader | back to summary |
|---|---|
| public void loadFromClassLoader(ClassLoader classLoader, String file, boolean wrap) | |
| provide | back to summary |
|---|---|
| public void provide(String name) | |
| reflectedLoad | back to summary |
|---|---|
| public static void reflectedLoad(Ruby runtime, String libraryName, String className, ClassLoader classLoader, boolean wrap) Load the org.jruby.runtime.load.Library implementation specified by className. The purpose of using this method is to avoid having static references to the given library class, thereby avoiding the additional classloading when the library is not in use.
| |
| require | back to summary |
|---|---|
| public boolean require(String requireName) | |
| resolveLoadName | back to summary |
|---|---|
| protected String resolveLoadName(LoadServiceResource foundResource, String previousPath) | |
| searchForLoad | back to summary |
|---|---|
| protected LibrarySearcher. Replaces findLibraryBySearchState but split off for load. Needed for OSGiLoadService to override. | |
| searchForRequire | back to summary |
|---|---|
| public char searchForRequire(String file, LibrarySearcher. Replaces findLibraryBySearchState but split off for require. Needed for OSGiLoadService to override. | |
| setMainScript | back to summary |
|---|---|
| public void setMainScript(String filename, String cwd) | |
| smartLoadInternal | back to summary |
|---|---|
| private LoadService. | |
| tearDown | back to summary |
|---|---|
| public void tearDown() | |
| tryLoadingLibraryOrScript | back to summary |
|---|---|
| protected boolean tryLoadingLibraryOrScript(Ruby runtime, Library library, String searchFile) | |
| warnCircularRequire | back to summary |
|---|---|
| protected void warnCircularRequire(String requireName) | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public static IRubyObject |
| LoadPathMethods | back to summary |
|---|---|
| public LoadPathMethods() | |
| resolve_feature_path | back to summary |
|---|---|
public static IRubyObject resolve_feature_path(ThreadContext context, IRubyObject self, IRubyObject pathArg)
| |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public long |
| LoadTimer | back to summary |
|---|---|
| private LoadTimer() | |
| endLoad | back to summary |
|---|---|
| public void endLoad(String file, long startTime) | |
| startLoad | back to summary |
|---|---|
| public long startLoad(String file) | |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final ConcurrentHashMap |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private LoadService. | executeAndClearLock(String path, Function<String, LoadService.
|
| private LoadService. | Returns: If the sync object already locked by current thread, it just returns false without getting a lock. Otherwise true.just a name for the lock. path, boolean circularRequireWarning, LoadService.Get exclusive lock for the specified requireName. |
| pool | back to summary |
|---|---|
| pack-priv final ConcurrentHashMap<String, LoadService. | |
| RequireLocks | back to summary |
|---|---|
| private RequireLocks() | |
| executeAndClearLock | back to summary |
|---|---|
| private LoadService. | |
| lock | back to summary |
|---|---|
| private LoadService. Get exclusive lock for the specified requireName. Acquire sync object for the requireName from the pool, then try to lock it. Note This lock is not fair for now.
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv volatile boolean |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| destroyed | back to summary |
|---|---|
| pack-priv volatile boolean destroyed | |
| RequireLock | back to summary |
|---|---|
| pack-priv RequireLock() | |
| Modifier and Type | Field and Description |
|---|---|
| public static final LoadService. | |
| public static final LoadService. | |
| public static final LoadService. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static LoadService. | |
| public static LoadService. |
| ALREADY_LOADED | back to summary |
|---|---|
| public static final LoadService. | |
| CIRCULAR | back to summary |
|---|---|
| public static final LoadService. | |
| LOADED | back to summary |
|---|---|
| public static final LoadService. | |
| RequireState | back to summary |
|---|---|
| private RequireState() | |
| valueOf | back to summary |
|---|---|
| public static LoadService. | |
| values | back to summary |
|---|---|
| public static LoadService. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final LoadService. | |
| public static final LoadService. | |
| public static final String[] | extensionSuffixes
Deprecated
|
| public static final LoadService. | |
| public static final LoadService. | |
| public static final String[] | sourceSuffixes
Deprecated
|
| public final EnumSet |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public String[] | |
| public EnumSet | |
| public static LoadService. | |
| public static LoadService. |
| Both | back to summary |
|---|---|
| public static final LoadService. | |
| Extension | back to summary |
|---|---|
| public static final LoadService. | |
| extensionSuffixes | back to summary |
|---|---|
| public static final String[] extensionSuffixes
Deprecated
| |
| Neither | back to summary |
|---|---|
| public static final LoadService. | |
| Source | back to summary |
|---|---|
| public static final LoadService. | |
| sourceSuffixes | back to summary |
|---|---|
| public static final String[] sourceSuffixes
Deprecated
| |
| suffixes | back to summary |
|---|---|
| public final EnumSet<LibrarySearcher. | |
| SuffixType | back to summary |
|---|---|
| private SuffixType(EnumSet<E extends Enum<E>> suffixes) | |
| getSuffixes | back to summary |
|---|---|
| public String[] getSuffixes()
Deprecated
| |
| getSuffixSet | back to summary |
|---|---|
| public EnumSet | |
| valueOf | back to summary |
|---|---|
| public static LoadService. | |
| values | back to summary |
|---|---|
| public static LoadService. | |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicInteger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| private StringBuilder | |
| public long |
| indent | back to summary |
|---|---|
| private final AtomicInteger indent | |
| TracingLoadTimer | back to summary |
|---|---|
| private TracingLoadTimer() | |
| endLoad | back to summary |
|---|---|
| public void endLoad(String file, long startTime) Overrides org.
| |
| getIndentString | back to summary |
|---|---|
| private StringBuilder getIndentString() | |
| startLoad | back to summary |
|---|---|
| public long startLoad(String file) Overrides org.
| |