Package aQute.bnd.component

Examples of aQute.bnd.component.TagResource


                analyzer.error("Duplicate pid %s from class %s", dDef.pid, c.getFQN());
              }
            }
            classToOCDMap.put(c.getClassName().getBinary(), definition);
            String name = "OSGI-INF/metatype/" + analyzer.validResourcePath(definition.id, "Invalid resource name") + ".xml";
            analyzer.getJar().putResource(name, new TagResource(definition.getTag()));
          }
        }
      }
    }
   
    header = OSGiHeader.parseHeader(analyzer.getProperty(Constants.DSANNOTATIONS));
    if (header.size() == 0)
      return false;

      instructions = new Instructions(header);
      list = analyzer.getClassspace().values();

    for (Clazz c: list) {
      for (Instruction instruction : instructions.keySet()) {

        if (instruction.matches(c.getFQN())) {
          if (instruction.isNegated())
            break;
          DesignateDef designate = DesignateReader.getDesignate(c, analyzer, classToOCDMap);
          if (designate != null) {
            designate.prepare(analyzer);
            String name = "OSGI-INF/metatype/" + analyzer.validResourcePath(c.getFQN(), "Invalid resource name") + ".xml";
            analyzer.getJar().putResource(name, new TagResource(designate.getOuterTag()));
          }
        }
      }
    }
    return false;
View Full Code Here


          OCDDef definition = OCDReader.getOCDDef(c, analyzer);
          if (definition != null) {
            definition.prepare(analyzer);
            classToOCDMap.put(c.getClassName().getBinary(), definition);
            String name = "OSGI-INF/metatype/" + analyzer.validResourcePath(definition.id, "Invalid resource name") + ".xml";
            analyzer.getJar().putResource(name, new TagResource(definition.getTag()));
          }
        }
      }
    }
   
    header = OSGiHeader.parseHeader(analyzer.getProperty(Constants.DSANNOTATIONS));
    if (header.size() == 0)
      return false;

      instructions = new Instructions(header);
      list = analyzer.getClassspace().values();

    for (Clazz c: list) {
      for (Instruction instruction : instructions.keySet()) {

        if (instruction.matches(c.getFQN())) {
          if (instruction.isNegated())
            break;
          DesignateDef designate = DesignateReader.getDesignate(c, analyzer, classToOCDMap);
          if (designate != null) {
            designate.prepare(analyzer);
            String name = "OSGI-INF/metatype/" + analyzer.validResourcePath(c.getFQN(), "Invalid resource name") + ".xml";
            analyzer.getJar().putResource(name, new TagResource(designate.getTag()));
          }
        }
      }
    }
    return false;
View Full Code Here

TOP

Related Classes of aQute.bnd.component.TagResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.