Class CommonModelRegistry

java.lang.Object
org.glassfish.hk2.classmodel.reflect.util.CommonModelRegistry
All Implemented Interfaces:
ResourceLocator

public class CommonModelRegistry extends Object implements ResourceLocator
  • Field Details

    • ctx

      org.osgi.framework.BundleContext ctx
    • pkgAdmin

      org.osgi.service.packageadmin.PackageAdmin pkgAdmin
    • _instance

      private static CommonModelRegistry _instance
  • Constructor Details

    • CommonModelRegistry

      private CommonModelRegistry()
  • Method Details

    • 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, String className)
    • openResourceStream

      public InputStream openResourceStream(String className) throws IOException
      Description copied from interface: ResourceLocator
      Opens and input stream for the resources identified by the parameter name.
      Specified by:
      openResourceStream in interface ResourceLocator
      Parameters:
      className - the resource identification
      Returns:
      an input stream, or null if the name does not exist
      Throws:
      IOException - on i/o error
    • getResource

      public URL getResource(String className)
      Description copied from interface: ResourceLocator
      Retrieves the URL given a resource name
      Specified by:
      getResource in interface ResourceLocator
      Parameters:
      className -
      Returns:
      the resource URL, or null if not found