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.BundleContext
ctx
(package private) org.osgi.service.packageadmin.PackageAdmin
pkgAdmin
-
Constructor Summary
Constructors Modifier Constructor Description private
CommonModelRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canLoadResources()
static CommonModelRegistry
getInstance()
java.net.URL
getResource(java.lang.String className)
Retrieves the URL given a resource name(package private) void
initialize(org.osgi.framework.BundleContext ctx, org.osgi.service.packageadmin.PackageAdmin pkgAdmin)
void
loadModel(ParsingContext ctx, java.lang.String className)
java.io.InputStream
openResourceStream(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.IOException
Description copied from interface:ResourceLocator
Opens and input stream for the resources identified by the parameter name.- Specified by:
openResourceStream
in 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:ResourceLocator
Retrieves the URL given a resource name- Specified by:
getResource
in interfaceResourceLocator
- Returns:
- the resource URL, or null if not found
-
-