| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static void | buildClassName(StringBuilder nameBuilder, StringBuilder fileBuilder, String[] all, int i, CharSequence serviceName)
|
| private static CharSequence | |
| public static int | |
| public String | |
| private static boolean | |
| public void | |
| pack-priv static ClassExtensionLibrary |
| name | back to summary |
|---|---|
| private final String name | |
| theClass | back to summary |
|---|---|
| private final Class<T> theClass | |
| ClassExtensionLibrary | back to summary |
|---|---|
| public ClassExtensionLibrary(String name, Class<T> extension) | |
| buildClassName | back to summary |
|---|---|
| private static void buildClassName(StringBuilder nameBuilder, StringBuilder fileBuilder, String[] all, int i, CharSequence serviceName) | |
| buildServiceName | back to summary |
|---|---|
| private static CharSequence buildServiceName(final String jarName) | |
| findLeftmostIdentifier | back to summary |
|---|---|
| public static int findLeftmostIdentifier(String[] all) | |
| getName | back to summary |
|---|---|
| public String getName() | |
| isJavaIdentifier | back to summary |
|---|---|
| private static boolean isJavaIdentifier(String str) | |
| load | back to summary |
|---|---|
| public void load(Ruby runtime, boolean wrap) Implements org. | |
| tryFind | back to summary |
|---|---|
| pack-priv static ClassExtensionLibrary tryFind(Ruby runtime, String searchName) Try to locate an extension service in the current classloader resources. This happens after the jar has been added to JRuby's URLClassLoader (JRubyClassLoader) and is how extensions can magically load. The basic logic is to use the require name (@param searchName) to build the name of a class ending in "Service", and then invoke that class to boot the extension. The looping logic here was in response to a RubyGems change that started absolutizing the path to the extension jar under some circumstances, leading to an incorrect package/class name for the service contained therein. The new logic will try successively more trailing elements until one of them is not a valid package name or all elements have been exhausted.
| |