org.apache.felix.framework.util.Util.getClassPackage()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(3.3k)|赞(0)|评价(0)|浏览(162)

本文整理了Java中org.apache.felix.framework.util.Util.getClassPackage()方法的一些代码示例,展示了Util.getClassPackage()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Util.getClassPackage()方法的具体详情如下:
包路径:org.apache.felix.framework.util.Util
类名称:Util
方法名:getClassPackage

Util.getClassPackage介绍

暂无

代码示例

代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main

public Class getClassByDelegation(String name) throws ClassNotFoundException
{
  if (!m_exportNames.contains(Util.getClassPackage(name)))
  {
    throw new ClassNotFoundException(name);
  }
  return getClass().getClassLoader().loadClass(name);
}

代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main

public Class getClass(String name) throws ClassNotFoundException
{
  // Get the package of the target class.
  String pkgName = Util.getClassPackage(name);
  ResolvedPackage rp = (ResolvedPackage) m_pkgMap.get(pkgName);
  if (rp != null)
  {
    try
    {
      Class clazz = m_exporter.getClassByDelegation(name);
      if (clazz != null)
      {
        return clazz;
      }
    }
    catch (ClassNotFoundException ex)
    {
      // Do not throw the exception here, since we want
      // to continue search other package sources and
      // ultimately the module's own content.
    }
  }
  return null;
}

代码示例来源:origin: apache/felix

private boolean isFiltered(String name)
  String pkgName = Util.getClassPackage(name);
  List<List<String>> includeFilters = m_includedPkgFilters.get(pkgName);
  List<List<String>> excludeFilters = m_excludedPkgFilters.get(pkgName);

代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main

public Class getClass(String name) throws ClassNotFoundException
{
  Class clazz = null;
  // Get the package of the target class.
  String pkgName = Util.getClassPackage(name);
  // Only check when the package of the target class is
  // the same as the package for the wire.
  if (m_capability.getNamespace().equals(ICapability.PACKAGE_NAMESPACE) &&
    m_capability.getProperties().get(ICapability.PACKAGE_PROPERTY).equals(pkgName))
  {
    // Check the include/exclude filters from the target package
    // to make sure that the class is actually visible. We delegate
    // to the exporting module, rather than its content, so it can
    // it can follow any internal wires it may have (e.g., if the
    // package has multiple sources).
    if (m_capability.getNamespace().equals(ICapability.PACKAGE_NAMESPACE)
      && ((Capability) m_capability).isIncluded(name))
    {
      clazz = m_exporter.getClassByDelegation(name);
    }
    // If no class was found, then we must throw an exception
    // since the exporter for this package did not contain the
    // requested class.
    if (clazz == null)
    {
      throw new ClassNotFoundException(name);
    }
  }
  return clazz;
}

代码示例来源:origin: apache/felix

String pkgName = Util.getClassPackage(name);
if (pkgName.length() == 0)

代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main

String pkgName = Util.getClassPackage(name);

代码示例来源:origin: apache/felix

String pkgName = (isClass) ? Util.getClassPackage(name) : Util.getResourcePackage(name);

代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main

? Util.getClassPackage(name)
: Util.getResourcePackage(name);

代码示例来源:origin: apache/felix

String pkgName = Util.getClassPackage(name);

代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main

String pkgName = Util.getClassPackage(name);
if (pkgName.length() > 0)

代码示例来源:origin: org.apache.servicemix.kernel/org.apache.servicemix.kernel.main

Util.getClassPackage(className);
IModule requesterModule = ((BundleImpl) requester).getCurrentModule();

代码示例来源:origin: apache/felix

Util.getClassPackage(className);

相关文章