/** * Return merged properties. The parameters provide a list of property names * which are concatenated in the output, separated by a comma. Not only are * those property names looked for, also all property names that have that * constant as a prefix, a '.', and then whatever (.*). The result is either * null if nothing was found or a list of properties */ public String mergeProperties(String key) { return mergeProperties(key, ","); }
/** * Return merged properties. The parameters provide a list of property names * which are concatenated in the output, separated by a comma. Not only are * those property names looked for, also all property names that have that * constant as a prefix, a '.', and then whatever (.*). The result is either * null if nothing was found or a list of properties */ public String mergeProperties(String key) { return mergeProperties(key, ","); }
/** * Return merged properties. The parameters provide a list of property names * which are concatenated in the output, separated by a comma. Not only are * those property names looked for, also all property names that have that * constant as a prefix, a '.', and then whatever (.*). The result is either * null if nothing was found or a list of properties */ public String mergeProperties(String key) { return mergeProperties(key, ","); }
/** * Return merged properties. The parameters provide a list of property names * which are concatenated in the output, separated by a comma. Not only are * those property names looked for, also all property names that have that * constant as a prefix, a '.', and then whatever (.*). The result is either * null if nothing was found or a list of properties */ public String mergeProperties(String key) { return mergeProperties(key, ","); }
/** * Get a Parameters from merged properties */ public Parameters getMergedParameters(String key) { return new Parameters(mergeProperties(key), this); }
/** * Get a Parameters from merged properties */ public Parameters getMergedParameters(String key) { return new Parameters(mergeProperties(key), this); }
@Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if (method.getDeclaringClass() == Object.class) { return method.invoke(this); } String name = Syntax.toInstruction(method); Object value = processor.mergeProperties(name); if (value == null) { if (args != null && args.length == 1) { return args[0]; } if (method.getDefaultValue() != null) return method.getDefaultValue(); } return converter.convertNeverNull(method.getGenericReturnType(), value); }
private void loadProvidedCapabilities(ResourceBuilder system) throws Exception { // // Some capabilities are provided by the runtime, like native // code. // We need to add them here so the resolver is aware of them // Parameters providedCapabilities = new Parameters(properties.mergeProperties(Constants.RUNPROVIDEDCAPABILITIES), project); system.addProvideCapabilities(providedCapabilities); }
private void loadProvidedCapabilities(ResourceBuilder system) throws Exception { // // Some capabilities are provided by the runtime, like native // code. // We need to add them here so the resolver is aware of them // Parameters providedCapabilities = new Parameters(properties.mergeProperties(Constants.RUNPROVIDEDCAPABILITIES), project); system.addProvideCapabilities(providedCapabilities); }
public void setProperties(Properties properties) { doIncludes(getBase(), properties); getProperties0().putAll(properties); mergeProperties(Constants.INIT); // execute macros in -init getProperties0().remove(Constants.INIT); }
public void setProperties(Properties properties) { doIncludes(getBase(), properties); getProperties0().putAll(properties); mergeProperties(Constants.INIT); // execute macros in -init getProperties0().remove(Constants.INIT); }
public void mergeProperties(File file, boolean override) { if (file.isFile()) { try { Properties properties = loadProperties(file); mergeProperties(properties, override); } catch (Exception e) { error("Error loading properties file: %s", file); } } else { if (!file.exists()) error("Properties file does not exist: %s", file); else error("Properties file must a file, not a directory: %s", file); } }
public String mergeLocalProperties(String key) { if (since(About._3_3)) { return getProperty(makeWildcard(key), null, ",", false); } else return mergeProperties(key); }
private void constructBlacklist(Processor augments) throws Exception { Parameters blacklist = new Parameters(augments.mergeProperties(Constants.RUNBLACKLIST), project); blacklist.putAll(new Parameters(properties.mergeProperties(Constants.RUNBLACKLIST), project)); if (blacklist != null && !blacklist.isEmpty()) { List<Requirement> reject = CapReqBuilder.getRequirementsFrom(blacklist); setBlackList(reject); } }
public void mergeProperties(File file, boolean override) { if (file.isFile()) { try { Properties properties = loadProperties(file); mergeProperties(properties, override); } catch (Exception e) { error("Error loading properties file: %s", file); } } else { if (!file.exists()) error("Properties file does not exist: %s", file); else error("Properties file must a file, not a directory: %s", file); } }
public String mergeLocalProperties(String key) { if (since(About._3_3)) { return getProperty(makeWildcard(key), null, ",", false); } else return mergeProperties(key); }
public void mergeProperties(File file, boolean override) { if (file.isFile()) { try { Properties properties = loadProperties(file); mergeProperties(properties, override); } catch (Exception e) { error("Error loading properties file: " + file); } } else { if (!file.exists()) error("Properties file does not exist: " + file); else error("Properties file must a file, not a directory: " + file); } }
private void constructBlacklist(Processor augments) throws Exception { Parameters blacklist = new Parameters(augments.mergeProperties(Constants.RUNBLACKLIST), project); blacklist.putAll(new Parameters(properties.mergeProperties(Constants.RUNBLACKLIST), project)); if (blacklist != null && !blacklist.isEmpty()) { List<Requirement> reject = CapReqBuilder.getRequirementsFrom(blacklist); setBlackList(reject); } }
Resource constructInputRequirements() throws Exception { ResourceBuilder resBuilder = new ResourceBuilder(); CapReqBuilder identity = new CapReqBuilder(IdentityNamespace.IDENTITY_NAMESPACE) .addAttribute(IdentityNamespace.IDENTITY_NAMESPACE, IDENTITY_INITIAL_RESOURCE); resBuilder.addCapability(identity); Parameters inputRequirements = new Parameters(properties.mergeProperties(Constants.RUNREQUIRES), project); if (inputRequirements != null && !inputRequirements.isEmpty()) { List<Requirement> requires = CapReqBuilder.getRequirementsFrom(inputRequirements); resBuilder.addRequirements(requires); } return resBuilder.build(); }
Resource constructInputRequirements() throws Exception { ResourceBuilder resBuilder = new ResourceBuilder(); CapReqBuilder identity = new CapReqBuilder(IdentityNamespace.IDENTITY_NAMESPACE) .addAttribute(IdentityNamespace.IDENTITY_NAMESPACE, IDENTITY_INITIAL_RESOURCE); resBuilder.addCapability(identity); Parameters inputRequirements = new Parameters(properties.mergeProperties(Constants.RUNREQUIRES), project); if (inputRequirements != null && !inputRequirements.isEmpty()) { List<Requirement> requires = CapReqBuilder.getRequirementsFrom(inputRequirements); resBuilder.addRequirements(requires); } return resBuilder.build(); }