Package org.datanucleus.plugin
Class PluginRegistryFactory
- java.lang.Object
-
- org.datanucleus.plugin.PluginRegistryFactory
-
public class PluginRegistryFactory extends java.lang.ObjectFactory for PluginRegistry. Creates an instance of PluginRegistry based on the available PluginRegistry implementation in the CLASSPATH.
-
-
Constructor Summary
Constructors Constructor Description PluginRegistryFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static PluginRegistrynewInstance(java.lang.String testClass, java.lang.String registryClassName, ClassLoaderResolver clr)Instantiates a PluginRegistry.static PluginRegistrynewPluginRegistry(java.lang.String registryClassName, java.lang.String registryBundleCheck, boolean allowUserBundles, ClassLoaderResolver clr)Instantiates a PluginRegistry.
-
-
-
Method Detail
-
newPluginRegistry
public static PluginRegistry newPluginRegistry(java.lang.String registryClassName, java.lang.String registryBundleCheck, boolean allowUserBundles, ClassLoaderResolver clr)
Instantiates a PluginRegistry. Will typically use NonManagedPluginRegistry in non-OSGi environments and OSGiPluginRegistry otherwise, subject to user input.- Parameters:
registryClassName- Name of the registryregistryBundleCheck- What to do on check of bundles (Only for Non-OSGi)allowUserBundles- Whether to only load DataNucleus bundles (org.datanucleus) (Only for Non-OSGi)clr- the ClassLoaderResolver- Returns:
- instance of the PluginRegistry
-
newInstance
private static PluginRegistry newInstance(java.lang.String testClass, java.lang.String registryClassName, ClassLoaderResolver clr)
Instantiates a PluginRegistry. Only proceed if the testClass is found in the classpath- Parameters:
testClass- A test classregistryClassName- Name of the class that implementsPluginRegistry- Returns:
- instance of the PluginRegistry
-
-