/** * This implementation returns {@code true} if a property with the given name or * any underscore/uppercase variant thereof exists in this property source. */ @Override @Nullable public Object getProperty(String name) { String actualName = resolvePropertyName(name); if (logger.isDebugEnabled() && !name.equals(actualName)) { logger.debug("PropertySource '" + getName() + "' does not contain property '" + name + "', but found equivalent '" + actualName + "'"); } return super.getProperty(actualName); }
@Override public Origin getOrigin(String name) { Object value = super.getProperty(name); if (value instanceof OriginTrackedValue) { return ((OriginTrackedValue) value).getOrigin(); } return null; }
/** * This implementation returns {@code true} if a property with the given name or * any underscore/uppercase variant thereof exists in this property source. */ @Override @Nullable public Object getProperty(String name) { String actualName = resolvePropertyName(name); if (logger.isDebugEnabled() && !name.equals(actualName)) { logger.debug("PropertySource '" + getName() + "' does not contain property '" + name + "', but found equivalent '" + actualName + "'"); } return super.getProperty(actualName); }
@Override public Object getProperty(String name) { Object value = super.getProperty(name); if (value instanceof OriginTrackedValue) { return ((OriginTrackedValue) value).getValue(); } return value; }
/** * {@inheritDoc} * <p>This implementation returns {@code true} if a property with the given name or * any underscore/uppercase variant thereof exists in this property source. */ @Override public Object getProperty(String name) { Assert.notNull(name, "property name must not be null"); String actualName = resolvePropertyName(name); if (actualName == null) { // at this point we know the property does not exist return null; } if (logger.isDebugEnabled() && !name.equals(actualName)) { logger.debug(String.format( "PropertySource [%s] does not contain '%s', but found equivalent '%s'", this.getName(), name, actualName)); } return super.getProperty(actualName); }
protected Object getProperty(Set<String> aliases, String original) { for (String alias : aliases) { Object value = super.getProperty(alias); if (value != null) { logger.debug(String.format("PropertySource [%s] does not contain '%s', but found equivalent '%s'", this.getName(), original, alias)); return value; } } return null; }
@Override public Object getProperty(String name) { Object value = super.getProperty(name); if(value instanceof Map) { Map map = (Map) value; if(map.isEmpty()) { return null; } else { Map newMap = new LinkedHashMap(); for (Object key : map.keySet()) { Object v = map.get(key); if( !(v instanceof ConfigObject)) { newMap.put(key, v); } } return newMap; } } return value; } }
/** * This implementation returns {@code true} if a property with the given name or * any underscore/uppercase variant thereof exists in this property source. */ @Override @Nullable public Object getProperty(String name) { String actualName = resolvePropertyName(name); if (logger.isDebugEnabled() && !name.equals(actualName)) { logger.debug("PropertySource '" + getName() + "' does not contain property '" + name + "', but found equivalent '" + actualName + "'"); } return super.getProperty(actualName); }
/** * This implementation returns {@code true} if a property with the given name or * any underscore/uppercase variant thereof exists in this property source. */ @Override public Object getProperty(String name) { String actualName = resolvePropertyName(name); if (logger.isDebugEnabled() && !name.equals(actualName)) { logger.debug(String.format("PropertySource [%s] does not contain '%s', but found equivalent '%s'", getName(), name, actualName)); } return super.getProperty(actualName); }
/** * This implementation returns {@code true} if a property with the given name or * any underscore/uppercase variant thereof exists in this property source. */ @Override @Nullable public Object getProperty(String name) { String actualName = resolvePropertyName(name); if (logger.isDebugEnabled() && !name.equals(actualName)) { logger.debug("PropertySource '" + getName() + "' does not contain property '" + name + "', but found equivalent '" + actualName + "'"); } return super.getProperty(actualName); }
/** * {@inheritDoc} */ @Override public Object getProperty(String name) { checkNotNull(name, "'name' cannot be null"); Object value = super.getProperty(name); if (value != null) { return value; } else { Set<String> aliases = getAliases(name); return getProperty(aliases, name); } }
@Override public Object getProperty(String name) { return containsProperty(name) && environment.containsProperty(conditionalProperty) ? super.getProperty(name) : null; } }