/** * Answer the bundle version. */ public String getVersion() { String version = getProperty(BUNDLE_VERSION); if (version == null) version = "0.0.0"; return version; }
public String getVersionPolicy(boolean implemented) { if (implemented) { return getProperty(PROVIDER_POLICY, DEFAULT_PROVIDER_POLICY); } return getProperty(CONSUMER_POLICY, DEFAULT_CONSUMER_POLICY); }
public String getVersionPolicy(boolean implemented) { if (implemented) { return getProperty(PROVIDER_POLICY, DEFAULT_PROVIDER_POLICY); } return getProperty(CONSUMER_POLICY, DEFAULT_CONSUMER_POLICY); }
/** * Answer the bundle version. * * @return */ public String getVersion() { String version = getProperty(BUNDLE_VERSION); if (version == null) version = "0.0.0"; return version; }
public String getVersionPolicy(boolean implemented) { if (implemented) { return getProperty(PROVIDER_POLICY, DEFAULT_PROVIDER_POLICY); } return getProperty(CONSUMER_POLICY, DEFAULT_CONSUMER_POLICY); }
@Override protected List<XMLType> getTypes(Analyzer analyzer) throws Exception { List<XMLType> types = new ArrayList<>(); String header = analyzer.getProperty(Constants.BUNDLE_BLUEPRINT, "OSGI-INF/blueprint"); process(types, "extract.xsl", header, ".*\\.xml"); header = analyzer.getProperty("Spring-Context", "META-INF/spring"); process(types, "extract.xsl", header, ".*\\.xml"); return types; }
/** * @return {@code true} if the {@code -resourceonly} instruction is set, * {@code false} otherwise */ boolean isResourceOnly() { return isTrue(getProperty(RESOURCEONLY)); }
@Override protected List<XMLType> getTypes(Analyzer analyzer) throws Exception { List<XMLType> types = new ArrayList<XMLType>(); String header = analyzer.getProperty("Bundle-Blueprint", "OSGI-INF/blueprint"); process(types, "extract.xsl", header, ".*\\.xml"); header = analyzer.getProperty("Spring-Context", "META-INF/spring"); process(types, "extract.xsl", header, ".*\\.xml"); return types; }
public MetaTypeReader(Clazz clazz, Analyzer reporter) { this.clazz = clazz; this.reporter = reporter; this.inherit = Processor.isTrue(reporter.getProperty("-metatype-inherit")); }
Instructions getFilter() { if (instructions == null) { String contract = analyzer.getProperty(Constants.CONTRACT, "*"); this.instructions = new Instructions(contract); } return instructions; }
/** * @return */ boolean isResourceOnly() { return isTrue(getProperty(RESOURCEONLY)); }
@Override protected List<XMLType> getTypes(Analyzer analyzer) throws Exception { List<XMLType> types = new ArrayList<XMLType>(); String header = analyzer.getProperty(Constants.BUNDLE_BLUEPRINT, "OSGI-INF/blueprint"); process(types, "extract.xsl", header, ".*\\.xml"); header = analyzer.getProperty("Spring-Context", "META-INF/spring"); process(types, "extract.xsl", header, ".*\\.xml"); return types; }
Instructions getFilter() { if (instructions == null) { String contract = analyzer.getProperty(Constants.CONTRACT); this.instructions = new Instructions(contract); } return instructions; }
public MetaTypeReader(Clazz clazz, Analyzer reporter) { this.clazz = clazz; this.reporter = reporter; this.inherit = Processor.isTrue(reporter.getProperty("-metatype-inherit")); }
/** * Find the source file for this type * * @param type * @throws Exception */ public String getSourceFileFor(TypeRef type) throws Exception { Set<File> sp = Collections.singleton(getFile(getProperty(DEFAULT_PROP_SRC_DIR, "src"))); return getSourceFileFor(type, sp); }
/** * Find the source file for this type * * @param type * @throws Exception */ public String getSourceFileFor(TypeRef type) throws Exception { Set<File> sp = Collections.singleton(getFile(getProperty(DEFAULT_PROP_SRC_DIR, "src"))); return getSourceFileFor(type, sp); }
public static ComponentDef getDefinition(Clazz c, Analyzer analyzer) throws Exception { boolean inherit = Processor.isTrue(analyzer.getProperty("-dsannotations-inherit")); boolean felixExtensions = Processor.isTrue(analyzer.getProperty("-ds-felix-extensions")); AnnotationReader r = new AnnotationReader(analyzer, c, inherit, felixExtensions); return r.getDef(); }
static OCDDef getOCDDef(Clazz c, Analyzer analyzer) throws Exception { boolean inherit = Processor.isTrue(analyzer.getProperty("-metatypeannotations-inherit")); OCDReader r = new OCDReader(analyzer, c, inherit); return r.getDef(); }
public static ComponentDef getDefinition(Clazz c, Analyzer analyzer) throws Exception { boolean inherit = Processor.isTrue(analyzer.getProperty("-dsannotations-inherit")); AnnotationReader r = new AnnotationReader(analyzer, c, inherit); return r.getDef(); }
private static void setBundleOptions(Analyzer analyzer, ArtifactBundlerInstructions instructions) { analyzer.setProperty(Analyzer.BUNDLE_SYMBOLICNAME, instructions.getSymbolicNameWithOptions()); if (analyzer.getProperty(Analyzer.BUNDLE_NAME) == null) { // in case name was not set in the instructions analyzer.setProperty(Analyzer.BUNDLE_NAME, instructions.getName()); } analyzer.setProperty(Analyzer.BUNDLE_VERSION, instructions.getVersion()); analyzer.setProperty(TOOL_KEY, TOOL); }