1 | /** | | 1 | /** |
2 | * Returns a string representation of the object for error messages | | 2 | * @return a string describing this object |
3 | * and the like | | 3 | */ |
4 | * @return a string representation of the object. | | 4 | public String toString() { |
5 | */ | | 5 | StringBuffer buf = new StringBuffer("{presentselector targetdir: "); |
6 | public String toString() { | | 6 | if (targetdir == null) { |
7 | StringBuffer buffer = new StringBuffer(); | | 7 | buf.append("NOT YET SET"); |
8 | buffer.append(namespace != null ? namespace : "(anonymous)"); | | 8 | } else { |
9 | buffer.append(' '); | | 9 | buf.append(targetdir.getName()); |
10 | buffer.append(url != null ? (url + " ") : ""); | | 10 | } |
11 | buffer.append(file != null ? file.getAbsolutePath() : ""); | | 11 | buf.append(" present: "); |
12 | return buffer.toString(); | | 12 | if (destmustexist) { |
13 | } | | 13 | buf.append("both"); |
| | | 14 | } else { |
| | | 15 | buf.append("srconly"); |
| | | 16 | } |
| | | 17 | if (map != null) { |
| | | 18 | buf.append(map.toString()); |
| | | 19 | } else if (mapperElement != null) { |
| | | 20 | buf.append(mapperElement.toString()); |
| | | 21 | } |
| | | 22 | buf.append("}"); |
| | | 23 | return buf.toString(); |
| | | 24 | } |