Class CommonModelRegistry
- java.lang.Object
-
- org.glassfish.hk2.classmodel.reflect.util.CommonModelRegistry
-
- All Implemented Interfaces:
ResourceLocator
public class CommonModelRegistry extends java.lang.Object implements ResourceLocator
-
-
Field Summary
Fields Modifier and Type Field Description private static CommonModelRegistry_instance(package private) org.osgi.framework.BundleContextctx(package private) org.osgi.service.packageadmin.PackageAdminpkgAdmin
-
Constructor Summary
Constructors Modifier Constructor Description privateCommonModelRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanLoadResources()static CommonModelRegistrygetInstance()java.net.URLgetResource(java.lang.String className)Retrieves the URL given a resource name(package private) voidinitialize(org.osgi.framework.BundleContext ctx, org.osgi.service.packageadmin.PackageAdmin pkgAdmin)voidloadModel(ParsingContext ctx, java.lang.String className)java.io.InputStreamopenResourceStream(java.lang.String className)Opens and input stream for the resources identified by the parameter name.
-
-
-
Field Detail
-
ctx
org.osgi.framework.BundleContext ctx
-
pkgAdmin
org.osgi.service.packageadmin.PackageAdmin pkgAdmin
-
_instance
private static CommonModelRegistry _instance
-
-
Method Detail
-
getInstance
public static CommonModelRegistry getInstance()
-
initialize
void initialize(org.osgi.framework.BundleContext ctx, org.osgi.service.packageadmin.PackageAdmin pkgAdmin)
-
canLoadResources
public boolean canLoadResources()
-
loadModel
public void loadModel(ParsingContext ctx, java.lang.String className)
-
openResourceStream
public java.io.InputStream openResourceStream(java.lang.String className) throws java.io.IOExceptionDescription copied from interface:ResourceLocatorOpens and input stream for the resources identified by the parameter name.- Specified by:
openResourceStreamin interfaceResourceLocator- Parameters:
className- the resource identification- Returns:
- an input stream, or null if the name does not exist
- Throws:
java.io.IOException- on i/o error
-
getResource
public java.net.URL getResource(java.lang.String className)
Description copied from interface:ResourceLocatorRetrieves the URL given a resource name- Specified by:
getResourcein interfaceResourceLocator- Returns:
- the resource URL, or null if not found
-
-