Browse Source

bug# 31972

PropertyHelper data members should be protected, not private

-added protected accessors to the live data, so that we have more of a choke point on their use/abuse.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@348764 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 19 years ago
parent
commit
4da759f146
1 changed files with 33 additions and 0 deletions
  1. +33
    -0
      src/main/org/apache/tools/ant/PropertyHelper.java

+ 33
- 0
src/main/org/apache/tools/ant/PropertyHelper.java View File

@@ -74,6 +74,9 @@ public class PropertyHelper {
protected PropertyHelper() { protected PropertyHelper() {
} }


//override facility for subclasses to put custom hashtables in


// -------------------- Hook management -------------------- // -------------------- Hook management --------------------


/** /**
@@ -481,6 +484,36 @@ public class PropertyHelper {
return new Hashtable(userProperties); return new Hashtable(userProperties);
} }


/**
* special back door for subclasses, internal access to
* the hashtables
* @return the live hashtable of all properties
*/
protected Hashtable getInternalProperties() {
return properties;
}

/**
* special back door for subclasses, internal access to
* the hashtables
*
* @return the live hashtable of user properties
*/
protected Hashtable getInternalUserProperties() {
return userProperties;
}

/**
* special back door for subclasses, internal access to
* the hashtables
*
* @return the live hashtable inherited properties
*/
protected Hashtable getInternalInheritedProperties() {
return inheritedProperties;
}


/** /**
* Copies all user properties that have not been set on the * Copies all user properties that have not been set on the
* command line or a GUI tool from this instance to the Project * command line or a GUI tool from this instance to the Project


Loading…
Cancel
Save