Methods Summary |
---|
private void | addChild(org.apache.harmony.prefs.tests.java.util.prefs.MockAbstractPreferences c)
childs.put(c.name(), c);
|
public java.util.prefs.AbstractPreferences[] | cachedChildrenImpl()
return super.cachedChildren();
|
private void | checkException()
switch (result) {
case NORMAL:
return;
case backingException:
throw new BackingStoreException("test");
case runtimeException:
throw new MockRuntimeException("test");
}
|
public java.util.prefs.AbstractPreferences | childSpi(java.lang.String name)
try {
checkException();
} catch (BackingStoreException e) {
}
if (result == returnNull)
return null;
AbstractPreferences r = childs.get(name);
if (r == null) {
r = new MockAbstractPreferences(this, name, true);
}
return r;
|
public java.lang.String[] | childrenNamesSpi()
checkException();
if (result == returnNull)
return null;
String[] r = new String[childs.size()];
childs.keySet().toArray(r);
return r;
|
public void | flushSpi()
checkException();
flushedTimes++;
|
public java.util.prefs.AbstractPreferences | getChildImpl(java.lang.String name)
return super.getChild(name);
|
public int | getFlushedTimes()
return flushedTimes;
|
public java.lang.Object | getLock()
return lock;
|
public boolean | getNewNode()
return newNode;
|
public java.lang.String | getSpi(java.lang.String key)
try {
checkException();
} catch (BackingStoreException e) {
}
if (null == key) {
return null;
}
return result == returnNull ? null : attr.getProperty(key);
|
public int | getSyncTimes()
return syncTimes;
|
public boolean | isRemovedImpl()
return super.isRemoved();
|
public java.lang.String[] | keysSpi()
checkException();
Set<Object> keys = attr.keySet();
String[] results = new String[keys.size()];
keys.toArray(results);
return result == returnNull ? null : results;
|
public java.lang.Object | lock()
return lock;
|
public void | protectedAbstractMethod()
try {
childrenNamesSpi();
} catch (BackingStoreException e) {
}
childSpi("mock");
try {
flushSpi();
} catch (BackingStoreException e1) {
}
getSpi(null);
isRemoved();
try {
keysSpi();
} catch (BackingStoreException e2) {
}
putSpi(null, null);
try {
removeNodeSpi();
} catch (BackingStoreException e3) {
}
removeSpi(null);
try {
syncSpi();
} catch (BackingStoreException e4) {
}
|
public java.util.prefs.AbstractPreferences | publicChildSpi(java.lang.String name)
return childSpi(name);
|
public void | putSpi(java.lang.String name, java.lang.String value)
try {
checkException();
} catch (BackingStoreException e) {
}
if (name == null || value == null) {
return;
}
attr.put(name, value);
|
protected void | removeNodeSpi()
checkException();
((MockAbstractPreferences) parent()).childs.remove(name());
|
public void | removeSpi(java.lang.String key)
try {
checkException();
} catch (BackingStoreException e) {
}
if (null == key) {
return;
}
attr.remove(key);
|
public void | resetFlushedTimes()
flushedTimes = 0;
|
public void | resetSyncTimes()
syncTimes = 0;
|
public void | setResult(int r)
result = r;
|
public void | syncSpi()
checkException();
syncTimes++;
|