| 1 | |
|
| 2 | |
|
| 3 | |
|
| 4 | |
|
| 5 | |
|
| 6 | |
|
| 7 | |
|
| 8 | |
|
| 9 | |
|
| 10 | |
|
| 11 | |
|
| 12 | |
|
| 13 | |
|
| 14 | |
|
| 15 | |
|
| 16 | |
package org.kuali.rice.core.util; |
| 17 | |
|
| 18 | |
import java.io.IOException; |
| 19 | |
import java.io.InputStream; |
| 20 | |
import java.io.OutputStream; |
| 21 | |
import java.io.Reader; |
| 22 | |
import java.util.InvalidPropertiesFormatException; |
| 23 | |
import java.util.Map; |
| 24 | |
import java.util.Properties; |
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
public class ImmutableProperties extends Properties { |
| 33 | |
|
| 34 | |
public ImmutableProperties(Properties properties){ |
| 35 | 0 | super(); |
| 36 | 0 | for(Object o: properties.keySet()){ |
| 37 | 0 | super.put(o, properties.get(o)); |
| 38 | |
} |
| 39 | 0 | } |
| 40 | |
|
| 41 | |
@Override |
| 42 | |
public synchronized void load(InputStream inStream) throws IOException { |
| 43 | 0 | throw new UnsupportedOperationException("This class is immutable"); |
| 44 | |
} |
| 45 | |
|
| 46 | |
|
| 47 | |
public synchronized void load(Reader reader) throws IOException { |
| 48 | 0 | throw new UnsupportedOperationException("This class is immutable"); |
| 49 | |
} |
| 50 | |
|
| 51 | |
@Override |
| 52 | |
public synchronized void loadFromXML(InputStream in) throws IOException, |
| 53 | |
InvalidPropertiesFormatException { |
| 54 | 0 | throw new UnsupportedOperationException("This class is immutable"); |
| 55 | |
} |
| 56 | |
|
| 57 | |
@Override |
| 58 | |
public synchronized void save(OutputStream out, String comments) { |
| 59 | 0 | throw new UnsupportedOperationException("This class is immutable"); |
| 60 | |
} |
| 61 | |
|
| 62 | |
@Override |
| 63 | |
public synchronized Object setProperty(String key, String value) { |
| 64 | 0 | throw new UnsupportedOperationException("This class is immutable"); |
| 65 | |
} |
| 66 | |
|
| 67 | |
@Override |
| 68 | |
public synchronized Object put(Object key, Object value) { |
| 69 | 0 | throw new UnsupportedOperationException("This class is immutable"); |
| 70 | |
} |
| 71 | |
|
| 72 | |
@Override |
| 73 | |
public synchronized void putAll(Map<? extends Object, ? extends Object> t) { |
| 74 | 0 | throw new UnsupportedOperationException("This class is immutable"); |
| 75 | |
} |
| 76 | |
|
| 77 | |
@Override |
| 78 | |
public synchronized Object remove(Object key) { |
| 79 | 0 | throw new UnsupportedOperationException("This class is immutable"); |
| 80 | |
} |
| 81 | |
|
| 82 | |
} |