if (isReference()) {
return getRef().getPropertyMap();
}
dieOnCircularReference();
final Mapper myMapper = getMapper();
final FileNameMapper m = myMapper == null ? null : myMapper.getImplementation();
final Map<String, Object> effectiveProperties = getEffectiveProperties();
final Set<String> propertyNames = getPropertyNames(effectiveProperties);
final Map<String, Object> result = new HashMap<String, Object>();
//iterate through the names, get the matching values
for (String name : propertyNames) {
Object value = effectiveProperties.get(name);
// TODO should we include null properties?
// TODO should we query the PropertyHelper for property value to grab potentially shadowed values?
if (value != null) {
// may be null if a system property has been added
// after the project instance has been initialized
if (m != null) {
//map the names
String[] newname = m.mapFileName(name);
if (newname != null) {
name = newname[0];
}
}
result.put(name, value);