aQute.bnd.osgi.Analyzer.assignable()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.8k)|赞(0)|评价(0)|浏览(82)

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

Analyzer.assignable介绍

暂无

代码示例

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

public boolean assignable(String annoService, String inferredService) {
  if (annoService == null || annoService.isEmpty() || inferredService == null || inferredService.isEmpty()
    || Object.class.getName()
      .equals(inferredService))
    return true;
  try {
    Clazz annoServiceClazz = findClass(getTypeRefFromFQN(annoService));
    Clazz inferredServiceClazz = findClass(getTypeRefFromFQN(inferredService));
    return assignable(annoServiceClazz, inferredServiceClazz);
  } catch (Exception e) {}
  // we couldn't determine
  return true;
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

public boolean assignable(String annoService, String inferredService) {
  if (annoService == null || annoService.isEmpty() || inferredService == null || inferredService.isEmpty()
    || Object.class.getName()
      .equals(inferredService))
    return true;
  try {
    Clazz annoServiceClazz = findClass(getTypeRefFromFQN(annoService));
    Clazz inferredServiceClazz = findClass(getTypeRefFromFQN(inferredService));
    return assignable(annoServiceClazz, inferredServiceClazz);
  } catch (Exception e) {}
  // we couldn't determine
  return true;
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

return false;
try {
  return assignable(findClass(zuper), inferredServiceClazz);
} catch (Exception e) {
for (TypeRef intf : intfs) {
  try {
    if (assignable(findClass(intf), inferredServiceClazz))
      return true;
  } catch (Exception e) {
  Clazz zuper = findClass(superType);
  if (zuper != null)
    return assignable(zuper, inferredServiceClazz);

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

return false;
try {
  return assignable(findClass(zuper), inferredServiceClazz);
} catch (Exception e) {
for (TypeRef intf : intfs) {
  try {
    if (assignable(findClass(intf), inferredServiceClazz))
      return true;
  } catch (Exception e) {
  Clazz zuper = findClass(superType);
  if (zuper != null)
    return assignable(zuper, inferredServiceClazz);

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

default :
      if (!analyzer.assignable(paramType, "java.util.Collection")) {
        break;
if (!analyzer.assignable(annoService, inferredService)) {
  if (!def.isCollection && "org.osgi.service.log.LoggerFactory".equals(annoService)
    && ("org.osgi.service.log.Logger".equals(paramType)

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

default :
      if (!analyzer.assignable(paramType, "java.util.Collection")) {
        break;
if (!analyzer.assignable(annoService, inferredService)) {
  if (!def.isCollection && "org.osgi.service.log.LoggerFactory".equals(annoService)
    && ("org.osgi.service.log.Logger".equals(paramType)

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

if (!analyzer.assignable(annoService, inferredService)) {
  if ("org.osgi.service.log.LoggerFactory".equals(annoService)
    && ("org.osgi.service.log.Logger".equals(paramType)

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

if (!analyzer.assignable(annoService, inferredService)) {
  if ("org.osgi.service.log.LoggerFactory".equals(annoService)
    && ("org.osgi.service.log.Logger".equals(paramType)

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

if (!analyzer.assignable(activatorClazz.getFQN(), "org.osgi.framework.BundleActivator")) {

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

if (!analyzer.assignable(activatorClazz.getFQN(), "org.osgi.framework.BundleActivator")) {

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

try {
  Clazz service = analyzer.findClass(typeRef);
  if (!analyzer.assignable(clazz, service)) {
    analyzer
      .error("Class %s is not assignable to specified service %s", clazz.getFQN(),

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

try {
  Clazz service = analyzer.findClass(typeRef);
  if (!analyzer.assignable(clazz, service)) {
    analyzer
      .error("Class %s is not assignable to specified service %s", clazz.getFQN(),

相关文章

Analyzer类方法