summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/Reference.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/IceInternal/Reference.java')
-rw-r--r--java/src/IceInternal/Reference.java150
1 files changed, 75 insertions, 75 deletions
diff --git a/java/src/IceInternal/Reference.java b/java/src/IceInternal/Reference.java
index e586a8715fb..59ccbee7bec 100644
--- a/java/src/IceInternal/Reference.java
+++ b/java/src/IceInternal/Reference.java
@@ -45,15 +45,15 @@ public abstract class Reference implements Cloneable
public final java.util.Map
getContext()
{
- return _context;
+ return _context;
}
public final Reference
defaultContext()
{
- Reference r = _instance.referenceFactory().copy(this);
- r._context = _instance.getDefaultContext();
- return r;
+ Reference r = _instance.referenceFactory().copy(this);
+ r._context = _instance.getDefaultContext();
+ return r;
}
@@ -92,56 +92,56 @@ public abstract class Reference implements Cloneable
public final Reference
changeContext(java.util.Map newContext)
{
- if(newContext == null)
- {
- newContext = _emptyContext;
- }
- Reference r = _instance.referenceFactory().copy(this);
- if(newContext.isEmpty())
- {
- r._context = _emptyContext;
- }
- else
- {
- r._context = new java.util.HashMap(newContext);
- }
- return r;
+ if(newContext == null)
+ {
+ newContext = _emptyContext;
+ }
+ Reference r = _instance.referenceFactory().copy(this);
+ if(newContext.isEmpty())
+ {
+ r._context = _emptyContext;
+ }
+ else
+ {
+ r._context = new java.util.HashMap(newContext);
+ }
+ return r;
}
public final Reference
changeMode(int newMode)
{
if(newMode == _mode)
- {
- return this;
- }
- Reference r = _instance.referenceFactory().copy(this);
- r._mode = newMode;
- return r;
+ {
+ return this;
+ }
+ Reference r = _instance.referenceFactory().copy(this);
+ r._mode = newMode;
+ return r;
}
public final Reference
changeIdentity(Ice.Identity newIdentity)
{
if(newIdentity.equals(_identity))
- {
- return this;
- }
- Reference r = _instance.referenceFactory().copy(this);
- r._identity = (Ice.Identity)newIdentity.clone();
- return r;
+ {
+ return this;
+ }
+ Reference r = _instance.referenceFactory().copy(this);
+ r._identity = (Ice.Identity)newIdentity.clone();
+ return r;
}
public final Reference
changeFacet(String newFacet)
{
if(newFacet.equals(_facet))
- {
- return this;
- }
- Reference r = _instance.referenceFactory().copy(this);
- r._facet = newFacet;
- return r;
+ {
+ return this;
+ }
+ Reference r = _instance.referenceFactory().copy(this);
+ r._facet = newFacet;
+ return r;
}
public abstract Reference changeSecure(boolean newSecure);
@@ -162,10 +162,10 @@ public abstract class Reference implements Cloneable
public synchronized int
hashCode()
{
- if(_hashInitialized)
- {
- return _hashValue;
- }
+ if(_hashInitialized)
+ {
+ return _hashValue;
+ }
int h = _mode;
@@ -181,7 +181,7 @@ public abstract class Reference implements Cloneable
h = 5 * h + (int)_identity.category.charAt(i);
}
- h = 5 * h + _context.entrySet().hashCode();
+ h = 5 * h + _context.entrySet().hashCode();
sz = _facet.length();
for(int i = 0; i < sz; i++)
@@ -191,8 +191,8 @@ public abstract class Reference implements Cloneable
h = 5 * h + (getSecure() ? 1 : 0);
- _hashValue = h;
- _hashInitialized = true;
+ _hashValue = h;
+ _hashInitialized = true;
return h;
}
@@ -225,7 +225,7 @@ public abstract class Reference implements Cloneable
s.writeBool(getSecure());
- // Derived class writes the remainder of the reference.
+ // Derived class writes the remainder of the reference.
}
//
@@ -234,13 +234,13 @@ public abstract class Reference implements Cloneable
public String
toString()
{
- //
- // WARNING: Certain features, such as proxy validation in Glacier2,
- // depend on the format of proxy strings. Changes to toString() and
- // methods called to generate parts of the reference string could break
- // these features. Please review for all features that depend on the
- // format of proxyToString() before changing this and related code.
- //
+ //
+ // WARNING: Certain features, such as proxy validation in Glacier2,
+ // depend on the format of proxy strings. Changes to toString() and
+ // methods called to generate parts of the reference string could break
+ // these features. Please review for all features that depend on the
+ // format of proxyToString() before changing this and related code.
+ //
StringBuffer s = new StringBuffer();
//
@@ -321,7 +321,7 @@ public abstract class Reference implements Cloneable
return s.toString();
- // Derived class writes the remainder of the string.
+ // Derived class writes the remainder of the string.
}
public abstract Ice.ConnectionI getConnection(Ice.BooleanHolder comp);
@@ -329,9 +329,9 @@ public abstract class Reference implements Cloneable
public boolean
equals(java.lang.Object obj)
{
- //
- // Note: if(this == obj) and type test are performed by each non-abstract derived class.
- //
+ //
+ // Note: if(this == obj) and type test are performed by each non-abstract derived class.
+ //
Reference r = (Reference)obj; // Guaranteed to succeed.
@@ -345,10 +345,10 @@ public abstract class Reference implements Cloneable
return false;
}
- if(!_context.equals(r._context))
- {
- return false;
- }
+ if(!_context.equals(r._context))
+ {
+ return false;
+ }
if(!_facet.equals(r._facet))
{
@@ -360,18 +360,18 @@ public abstract class Reference implements Cloneable
public Object clone()
{
- //
- // A member-wise copy is safe because the members are immutable.
- //
- Object o = null;
- try
- {
- o = super.clone();
- }
- catch(CloneNotSupportedException ex)
- {
- }
- return o;
+ //
+ // A member-wise copy is safe because the members are immutable.
+ //
+ Object o = null;
+ try
+ {
+ o = super.clone();
+ }
+ catch(CloneNotSupportedException ex)
+ {
+ }
+ return o;
}
private Instance _instance;
@@ -388,9 +388,9 @@ public abstract class Reference implements Cloneable
protected
Reference(Instance inst,
- Ice.Communicator communicator,
+ Ice.Communicator communicator,
Ice.Identity ident,
- java.util.Map ctx,
+ java.util.Map ctx,
String fac,
int md)
{
@@ -405,8 +405,8 @@ public abstract class Reference implements Cloneable
_communicator = communicator;
_mode = md;
_identity = ident;
- _context = ctx == null ? _emptyContext : ctx;
+ _context = ctx == null ? _emptyContext : ctx;
_facet = fac;
- _hashInitialized = false;
+ _hashInitialized = false;
}
}