You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by da...@apache.org on 2006/08/18 01:23:15 UTC
svn commit: r432431 - in
/geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context:
AbstractReadOnlyContext.java AbstractUnmodifiableContext.java
ImmutableContext.java UnmodifiableContext.java
Author: dain
Date: Thu Aug 17 16:23:14 2006
New Revision: 432431
URL: http://svn.apache.org/viewvc?rev=432431&view=rev
Log:
Renamed AbstractReadOnlyContext to AbstractUnmodifiableContext
Added:
geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractUnmodifiableContext.java
- copied, changed from r432428, geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractReadOnlyContext.java
Removed:
geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractReadOnlyContext.java
Modified:
geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/ImmutableContext.java
geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/UnmodifiableContext.java
Copied: geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractUnmodifiableContext.java (from r432428, geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractReadOnlyContext.java)
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractUnmodifiableContext.java?p2=geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractUnmodifiableContext.java&p1=geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractReadOnlyContext.java&r1=432428&r2=432431&rev=432431&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractReadOnlyContext.java (original)
+++ geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/AbstractUnmodifiableContext.java Thu Aug 17 16:23:14 2006
@@ -34,10 +34,10 @@
/**
* @version $Rev: 355877 $ $Date: 2005-12-10 18:48:27 -0800 (Sat, 10 Dec 2005) $
*/
-public abstract class AbstractReadOnlyContext extends AbstractContext implements Context, ContextFactory, Serializable {
+public abstract class AbstractUnmodifiableContext extends AbstractContext implements Context, ContextFactory, Serializable {
private static final long serialVersionUID = 3808693663629444493L;
- protected AbstractReadOnlyContext(String nameInNamespace) {
+ protected AbstractUnmodifiableContext(String nameInNamespace) {
super(nameInNamespace);
}
@@ -180,7 +180,7 @@
throw new InvalidNameException("Name is empty");
}
- AbstractReadOnlyContext currentContext = this;
+ AbstractUnmodifiableContext currentContext = this;
for (int i = 0; i < compoundName.size(); i++) {
String part = compoundName.get(i);
@@ -212,11 +212,11 @@
} else {
// the current value must be an abstract read only context
// todo this is a problem since a nested node could be an AbstractReadOnlyContext but not one of our contexts
- if (!(currentValue instanceof AbstractReadOnlyContext)) {
+ if (!(currentValue instanceof AbstractUnmodifiableContext)) {
throw new NotContextException("Expected an instance of AbstractReadOnlyContext to be bound at " +
part + " but found an instance of " + currentValue.getClass().getName());
}
- currentContext = (AbstractReadOnlyContext) currentValue;
+ currentContext = (AbstractUnmodifiableContext) currentValue;
// now we recurse into the current context
}
}
@@ -244,7 +244,7 @@
String key = name.get(i + 1);
value = createContext(fullPath, Collections.singletonMap(key, value));
}
- return (AbstractReadOnlyContext) value;
+ return (AbstractUnmodifiableContext) value;
}
//
@@ -272,10 +272,10 @@
// we serch the tree for a target context and name to remove
// this is normally the last context in the tree and the final name part, but
// it may be farther up the path if the intervening nodes are empty
- AbstractReadOnlyContext targetContext = this;
+ AbstractUnmodifiableContext targetContext = this;
String targetName = compoundName.get(0);
- AbstractReadOnlyContext currentContext = this;
+ AbstractUnmodifiableContext currentContext = this;
for (int i = 0; i < compoundName.size(); i++) {
String part = compoundName.get(i);
@@ -308,11 +308,11 @@
} else {
// the current value must be an abstract read only context
// todo this is a problem since a nested node could be an AbstractReadOnlyContext but not one of our contexts
- if (!(currentValue instanceof AbstractReadOnlyContext)) {
+ if (!(currentValue instanceof AbstractUnmodifiableContext)) {
throw new NotContextException("Expected an instance of AbstractReadOnlyContext to be bound at " +
part + " but found an instance of " + currentValue.getClass().getName());
}
- currentContext = (AbstractReadOnlyContext) currentValue;
+ currentContext = (AbstractUnmodifiableContext) currentValue;
// now we recurse into the current context
}
}
Modified: geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/ImmutableContext.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/ImmutableContext.java?rev=432431&r1=432430&r2=432431&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/ImmutableContext.java (original)
+++ geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/ImmutableContext.java Thu Aug 17 16:23:14 2006
@@ -30,7 +30,7 @@
*
* @version $Rev: 417891 $ $Date: 2006-06-28 15:45:07 -0700 (Wed, 28 Jun 2006) $
*/
-public class ImmutableContext extends AbstractReadOnlyContext {
+public class ImmutableContext extends AbstractUnmodifiableContext {
private final Map localBindings;
private final Map absoluteIndex;
@@ -99,7 +99,7 @@
/**
* Nested context which shares the absolute index map in MapContext.
*/
- public final class NestedMapContext extends AbstractReadOnlyContext {
+ public final class NestedMapContext extends AbstractUnmodifiableContext {
private final Map localBindings;
private final String pathWithSlash;
Modified: geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/UnmodifiableContext.java
URL: http://svn.apache.org/viewvc/geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/UnmodifiableContext.java?rev=432431&r1=432430&r2=432431&view=diff
==============================================================================
--- geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/UnmodifiableContext.java (original)
+++ geronimo/xbean/branches/colossus/xbean-naming/src/main/java/org/apache/xbean/naming/context/UnmodifiableContext.java Thu Aug 17 16:23:14 2006
@@ -33,7 +33,7 @@
/**
* @version $Rev: 417891 $ $Date: 2006-06-28 15:45:07 -0700 (Wed, 28 Jun 2006) $
*/
-public class UnmodifiableContext extends AbstractReadOnlyContext {
+public class UnmodifiableContext extends AbstractUnmodifiableContext {
private final Lock writeLock = new ReentrantLock();
private final AtomicReference bindingsRef;
private final AtomicReference indexRef;
@@ -162,7 +162,7 @@
/**
* Nested context which shares the absolute index map in MapContext.
*/
- public final class NestedMapContext extends AbstractReadOnlyContext {
+ public final class NestedMapContext extends AbstractUnmodifiableContext {
private final AtomicReference bindingsRef;
private final String pathWithSlash;