geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject [19/51] [abbrv] geronimo-yoko git commit: Improve ModelElement encapsulation
Date Sun, 19 Feb 2017 01:49:36 GMT
Improve ModelElement encapsulation


Project: http://git-wip-us.apache.org/repos/asf/geronimo-yoko/repo
Commit: http://git-wip-us.apache.org/repos/asf/geronimo-yoko/commit/6e0a2827
Tree: http://git-wip-us.apache.org/repos/asf/geronimo-yoko/tree/6e0a2827
Diff: http://git-wip-us.apache.org/repos/asf/geronimo-yoko/diff/6e0a2827

Branch: refs/heads/master
Commit: 6e0a2827b5dfdb8bcf03b7bc32bb751350477e2c
Parents: bef8dcf
Author: Neil GM Richards <neil_richards@uk.ibm.com>
Authored: Fri Mar 18 14:01:16 2016 +0000
Committer: Neil GM Richards <neil_richards@uk.ibm.com>
Committed: Fri Mar 18 14:01:16 2016 +0000

----------------------------------------------------------------------
 .../yoko/rmi/impl/AbstractObjectDescriptor.java |   2 +-
 .../org/apache/yoko/rmi/impl/AnyDescriptor.java |   2 +-
 .../apache/yoko/rmi/impl/ArrayDescriptor.java   |  26 +--
 .../yoko/rmi/impl/ClassDescDescriptor.java      |   2 +-
 .../apache/yoko/rmi/impl/ClassDescriptor.java   |   2 +-
 .../yoko/rmi/impl/DateValueDescriptor.java      |   5 +-
 .../apache/yoko/rmi/impl/EnumDescriptor.java    |   4 +-
 .../yoko/rmi/impl/EnumSubclassDescriptor.java   |   2 +-
 .../yoko/rmi/impl/ExceptionDescriptor.java      |   2 +-
 .../apache/yoko/rmi/impl/FVDEnumDescriptor.java |   2 +-
 .../rmi/impl/FVDEnumSubclassDescriptor.java     |   2 +-
 .../yoko/rmi/impl/FVDValueDescriptor.java       |   4 +-
 .../apache/yoko/rmi/impl/FieldDescriptor.java   | 182 +++++++++----------
 .../yoko/rmi/impl/IDLEntityDescriptor.java      |   2 +-
 .../apache/yoko/rmi/impl/MethodDescriptor.java  |  43 ++---
 .../org/apache/yoko/rmi/impl/ModelElement.java  |  48 +----
 .../apache/yoko/rmi/impl/RMIStubDescriptor.java |   2 +-
 .../yoko/rmi/impl/RemoteClassDescriptor.java    |   2 +-
 .../apache/yoko/rmi/impl/RemoteDescriptor.java  |  21 +--
 .../rmi/impl/RemoteInterfaceDescriptor.java     |   2 +-
 .../apache/yoko/rmi/impl/SimpleDescriptor.java  |   3 +-
 .../apache/yoko/rmi/impl/StringDescriptor.java  |   2 +-
 .../apache/yoko/rmi/impl/TypeDescriptor.java    |  22 ++-
 .../apache/yoko/rmi/impl/ValueDescriptor.java   |  49 +++--
 24 files changed, 199 insertions(+), 234 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/AbstractObjectDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/AbstractObjectDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/AbstractObjectDescriptor.java
index d1ffe66..80f8e42 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/AbstractObjectDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/AbstractObjectDescriptor.java
@@ -18,7 +18,7 @@
 
 package org.apache.yoko.rmi.impl;
 
-public class AbstractObjectDescriptor extends ValueDescriptor {
+class AbstractObjectDescriptor extends ValueDescriptor {
     protected AbstractObjectDescriptor(Class type, TypeRepository repository) {
         super(type, repository);
     }

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/AnyDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/AnyDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/AnyDescriptor.java
index 11c22c9..39d2c3a 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/AnyDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/AnyDescriptor.java
@@ -18,7 +18,7 @@
 
 package org.apache.yoko.rmi.impl;
 
-public class AnyDescriptor extends TypeDescriptor {
+class AnyDescriptor extends TypeDescriptor {
     AnyDescriptor(Class type, TypeRepository rep) {
         super(type, rep);
     }

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ArrayDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ArrayDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ArrayDescriptor.java
index b3ee101..0eccedb 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ArrayDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ArrayDescriptor.java
@@ -21,18 +21,15 @@ package org.apache.yoko.rmi.impl;
 import java.io.Serializable;
 import java.lang.reflect.Array;
 import java.util.Map;
-import java.util.Vector;
 import java.util.logging.Logger;
 
-import javax.rmi.CORBA.Util;
-
 import org.omg.CORBA.MARSHAL;
 import org.omg.CORBA.ORB;
 import org.omg.CORBA.TypeCode;
 import org.omg.CORBA.ValueMember;
 import org.omg.CORBA.portable.InputStream;
 
-public abstract class ArrayDescriptor extends ValueDescriptor {
+abstract class ArrayDescriptor extends ValueDescriptor {
     protected int order;
 
     protected Class basicType;
@@ -50,8 +47,7 @@ public abstract class ArrayDescriptor extends ValueDescriptor {
         if (elementType.isPrimitive() || elementType == Object.class) {
             _repid = "RMI:" + getJavaClass().getName() + ":0000000000000000";
         } else {
-            TypeDescriptor desc = getTypeRepository()
-                    .getDescriptor(elementType);
+            TypeDescriptor desc = repo.getDescriptor(elementType);
             String elemRep = desc.getRepositoryID();
             String hash = elemRep.substring(elemRep.indexOf(':', 4));
             _repid = "RMI:" + getJavaClass().getName() + hash;
@@ -72,8 +68,7 @@ public abstract class ArrayDescriptor extends ValueDescriptor {
             // use the descriptor type past the array type marker
             _elementRepid = "RMI:" + getJavaClass().getName().substring(1) + ":0000000000000000";
         } else {
-            TypeDescriptor desc = getTypeRepository()
-                    .getDescriptor(elementType);
+            TypeDescriptor desc = repo.getDescriptor(elementType);
             _elementRepid = desc.getRepositoryID();
         }
 
@@ -98,7 +93,7 @@ public abstract class ArrayDescriptor extends ValueDescriptor {
     public String getIDLName() {
         StringBuffer sb = new StringBuffer("org_omg_boxedRMI_");
 
-        TypeDescriptor desc = getTypeRepository().getDescriptor(basicType);
+        TypeDescriptor desc = repo.getDescriptor(basicType);
         
         // The logic that looks for the last "_" fails when this is a 
         // long_long primitive type.  The primitive types have a "" package 
@@ -209,8 +204,7 @@ public abstract class ArrayDescriptor extends ValueDescriptor {
 
             _value_members = new org.omg.CORBA.ValueMember[1];
 
-            TypeDescriptor elemDesc = getTypeRepository().getDescriptor(
-                    elementType);
+            TypeDescriptor elemDesc = repo.getDescriptor(elementType);
 
             String elemRepID = elemDesc.getRepositoryID();
 
@@ -228,7 +222,7 @@ public abstract class ArrayDescriptor extends ValueDescriptor {
     }
 
     void addDependencies(java.util.Set classes) {
-        getTypeRepository().getDescriptor(basicType).addDependencies(classes);
+        repo.getDescriptor(basicType).addDependencies(classes);
     }
 
 }
@@ -316,7 +310,7 @@ class ObjectArrayDescriptor extends ArrayDescriptor {
 
     void printFields(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         Object[] arr = (Object[]) val;
-        TypeDescriptor desc = getTypeRepository().getDescriptor(elementType);
+        TypeDescriptor desc = repo.getDescriptor(elementType);
         pw.print("length=" + arr.length + "; ");
         for (int i = 0; i < arr.length; i++) {
             if (i != 0) {
@@ -397,7 +391,7 @@ class RemoteArrayDescriptor extends ArrayDescriptor {
 
     void printFields(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         Object[] arr = (Object[]) val;
-        TypeDescriptor desc = getTypeRepository().getDescriptor(elementType);
+        TypeDescriptor desc = repo.getDescriptor(elementType);
         pw.print("length=" + arr.length + "; ");
         for (int i = 0; i < arr.length; i++) {
             if (i != 0) {
@@ -469,7 +463,7 @@ class ValueArrayDescriptor extends ArrayDescriptor {
 
     void printFields(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         Object[] arr = (Object[]) val;
-        TypeDescriptor desc = getTypeRepository().getDescriptor(elementType);
+        TypeDescriptor desc = repo.getDescriptor(elementType);
         pw.print("length=" + arr.length + "; ");
         for (int i = 0; i < arr.length; i++) {
             if (i != 0) {
@@ -550,7 +544,7 @@ class AbstractObjectArrayDescriptor extends ArrayDescriptor {
 
     void printFields(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         Object[] arr = (Object[]) val;
-        TypeDescriptor desc = getTypeRepository().getDescriptor(elementType);
+        TypeDescriptor desc = repo.getDescriptor(elementType);
         pw.print("length=" + arr.length + "; ");
         for (int i = 0; i < arr.length; i++) {
             if (i != 0) {

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ClassDescDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ClassDescDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ClassDescDescriptor.java
index eff9cb1..1a93939 100644
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ClassDescDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ClassDescDescriptor.java
@@ -13,7 +13,7 @@ import javax.rmi.CORBA.Util;
 import org.apache.yoko.util.cmsf.RepIds;
 import org.omg.CORBA.MARSHAL;
 
-public class ClassDescDescriptor extends ClassBaseDescriptor {
+class ClassDescDescriptor extends ClassBaseDescriptor {
     private static final Logger logger = Logger.getLogger(ClassDescDescriptor.class.getName());
 
     private Field repid_field;

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ClassDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ClassDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ClassDescriptor.java
index fab9919..d296aed 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ClassDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ClassDescriptor.java
@@ -31,7 +31,7 @@ import javax.rmi.CORBA.ValueHandler;
 
 import org.omg.CORBA.MARSHAL;
 
-public class ClassDescriptor extends ClassBaseDescriptor {
+class ClassDescriptor extends ClassBaseDescriptor {
     private static final Logger logger = Logger.getLogger(ClassDescriptor.class.getName());
 
     private Field repid_field;

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/DateValueDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/DateValueDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/DateValueDescriptor.java
index bb718d1..bfc500c 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/DateValueDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/DateValueDescriptor.java
@@ -27,12 +27,11 @@ import java.util.Date;
  * Window>Preferences>Java>Templates. To enable and disable the creation of type
  * comments go to Window>Preferences>Java>Code Generation.
  */
-public class DateValueDescriptor extends ValueDescriptor {
+class DateValueDescriptor extends ValueDescriptor {
 
     /**
      * Constructor for DateValueDescriptor.
-     * 
-     * @param type
+     *
      * @param repository
      */
     public DateValueDescriptor(TypeRepository repository) {

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/EnumDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/EnumDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/EnumDescriptor.java
index c1827b7..5c35933 100644
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/EnumDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/EnumDescriptor.java
@@ -18,7 +18,7 @@
 
 package org.apache.yoko.rmi.impl;
 
-public class EnumDescriptor extends ValueDescriptor {
+class EnumDescriptor extends ValueDescriptor {
     public EnumDescriptor(Class<?> type, TypeRepository repo) {
         super(type, repo);
     }
@@ -38,7 +38,7 @@ public class EnumDescriptor extends ValueDescriptor {
         super.init();
         FieldDescriptor[] newFields = new FieldDescriptor[1];
         for (FieldDescriptor field: _fields) {
-            if (!!!field.getJavaName().equals("name")) continue;
+            if (!!!field.java_name.equals("name")) continue;
             newFields[0] = field;
             break;
         }

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/EnumSubclassDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/EnumSubclassDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/EnumSubclassDescriptor.java
index 0aeed60..4f5a67f 100644
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/EnumSubclassDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/EnumSubclassDescriptor.java
@@ -25,7 +25,7 @@ import java.util.Map;
 import org.omg.CORBA.portable.IndirectionException;
 import org.omg.CORBA.portable.InputStream;
 
-public class EnumSubclassDescriptor extends ValueDescriptor {
+class EnumSubclassDescriptor extends ValueDescriptor {
     @SuppressWarnings("rawtypes")
     private final Class enumType;
 

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ExceptionDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ExceptionDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ExceptionDescriptor.java
index 0e2cd61..89fd716 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ExceptionDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ExceptionDescriptor.java
@@ -18,7 +18,7 @@
 
 package org.apache.yoko.rmi.impl;
 
-public class ExceptionDescriptor extends ValueDescriptor {
+class ExceptionDescriptor extends ValueDescriptor {
     ExceptionDescriptor(Class type, TypeRepository repository) {
         super(type, repository);
     }

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDEnumDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDEnumDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDEnumDescriptor.java
index b55e906..c90be24 100644
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDEnumDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDEnumDescriptor.java
@@ -21,7 +21,7 @@ package org.apache.yoko.rmi.impl;
 import org.omg.CORBA.TypeCode;
 import org.omg.CORBA.ValueDefPackage.FullValueDescription;
 
-public class FVDEnumDescriptor extends EnumDescriptor {
+class FVDEnumDescriptor extends EnumDescriptor {
     private final FullValueDescription fvd;
     private final String repid;
 

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDEnumSubclassDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDEnumSubclassDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDEnumSubclassDescriptor.java
index d898dcd..7a06399 100644
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDEnumSubclassDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDEnumSubclassDescriptor.java
@@ -23,7 +23,7 @@ import org.omg.CORBA.ValueDefPackage.FullValueDescription;
 
 import java.util.Objects;
 
-public class FVDEnumSubclassDescriptor extends EnumSubclassDescriptor {
+class FVDEnumSubclassDescriptor extends EnumSubclassDescriptor {
     private final FullValueDescription fvd;
     private final String repid;
 

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDValueDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDValueDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDValueDescriptor.java
index 5c20871..bdd4964 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDValueDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FVDValueDescriptor.java
@@ -24,7 +24,7 @@ import org.omg.CORBA.ValueDefPackage.FullValueDescription;
 /**
  * @author krab
  */
-public class FVDValueDescriptor extends ValueDescriptor {
+class FVDValueDescriptor extends ValueDescriptor {
     FullValueDescription fvd;
 
     String repid;
@@ -65,7 +65,7 @@ public class FVDValueDescriptor extends ValueDescriptor {
         FieldDescriptor result = null;
 
         for (Class c = getJavaClass(); c != null; c = c.getSuperclass()) {
-            TypeDescriptor td = getTypeRepository().getDescriptor(c);
+            TypeDescriptor td = repo.getDescriptor(c);
             if (td instanceof ValueDescriptor) {
                 ValueDescriptor vd = (ValueDescriptor) td;
                 FieldDescriptor[] fds = vd._fields;

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FieldDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FieldDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FieldDescriptor.java
index 87f37da..00c2b1d 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FieldDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/FieldDescriptor.java
@@ -28,8 +28,7 @@ import java.util.logging.Level;
 
 import org.omg.CORBA.ValueMember;
 
-public abstract class FieldDescriptor extends ModelElement implements
-Comparable {
+abstract class FieldDescriptor extends ModelElement implements Comparable {
     static Logger logger = Logger.getLogger(FieldDescriptor.class.getName());
 
     org.apache.yoko.rmi.util.corba.Field field;
@@ -45,9 +44,9 @@ Comparable {
     boolean isPublic;
 
     protected FieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
+            java.lang.reflect.Field f, TypeRepository repo) {
+        super(repo, name);
         this.type = type;
-        setJavaName(name);
         setIDLName(name);
         declaringClass = owner;
 
@@ -97,7 +96,7 @@ Comparable {
         //
         // fields of the same kind are ordered lexicographically
         //	
-        return getJavaName().compareTo(desc.getJavaName());
+        return java_name.compareTo(desc.java_name);
     }
 
     public boolean isPrimitive() {
@@ -118,11 +117,11 @@ Comparable {
 
     abstract void copyState(Object orig, Object copy, CopyState state);
 
-    static FieldDescriptor get(java.lang.reflect.Field f) {
-        return get(f.getDeclaringClass(), f.getType(), f.getName(), f);
+    static FieldDescriptor get(java.lang.reflect.Field f, TypeRepository repository) {
+        return get(f.getDeclaringClass(), f.getType(), f.getName(), f, repository);
     }
 
-    static FieldDescriptor get(Class declaringClass, ObjectStreamField field) {
+    static FieldDescriptor get(Class declaringClass, ObjectStreamField field, TypeRepository repository) {
         Field f = null;
         try {
             f = declaringClass.getDeclaredField(field.getName());
@@ -131,71 +130,70 @@ Comparable {
                     + "\" for class \"" + declaringClass.getName() + "\""
                     + "\n" + ex, ex);
         }
-        return get(declaringClass, field.getType(), field.getName(), f);
+        return get(declaringClass, field.getType(), field.getName(), f, repository);
     }
 
     static FieldDescriptor get(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
+            java.lang.reflect.Field f, TypeRepository repository) {
 
         if (type.isPrimitive()) {
             if (type == Boolean.TYPE) {
-                return new BooleanFieldDescriptor(owner, type, name, f);
+                return new BooleanFieldDescriptor(owner, type, name, f, repository);
             } else if (type == Byte.TYPE) {
-                return new ByteFieldDescriptor(owner, type, name, f);
+                return new ByteFieldDescriptor(owner, type, name, f, repository);
             } else if (type == Short.TYPE) {
-                return new ShortFieldDescriptor(owner, type, name, f);
+                return new ShortFieldDescriptor(owner, type, name, f, repository);
             } else if (type == Character.TYPE) {
-                return new CharFieldDescriptor(owner, type, name, f);
+                return new CharFieldDescriptor(owner, type, name, f, repository);
             } else if (type == Integer.TYPE) {
-                return new IntFieldDescriptor(owner, type, name, f);
+                return new IntFieldDescriptor(owner, type, name, f, repository);
             } else if (type == Long.TYPE) {
-                return new LongFieldDescriptor(owner, type, name, f);
+                return new LongFieldDescriptor(owner, type, name, f, repository);
             } else if (type == Float.TYPE) {
-                return new FloatFieldDescriptor(owner, type, name, f);
+                return new FloatFieldDescriptor(owner, type, name, f, repository);
             } else if (type == Double.TYPE) {
-                return new DoubleFieldDescriptor(owner, type, name, f);
+                return new DoubleFieldDescriptor(owner, type, name, f, repository);
             } else {
                 throw new RuntimeException("unknown field type " + type);
             }
 
         } else {
             if(org.omg.CORBA.Object.class.isAssignableFrom(type)) {
-                return new CorbaObjectFieldDescriptor(owner, type, name, f);
+                return new CorbaObjectFieldDescriptor(owner, type, name, f, repository);
             }
             if (java.lang.Object.class.equals(type)
                     || java.io.Externalizable.class.equals(type)
                     || java.io.Serializable.class.equals(type)) {
-                return new AnyFieldDescriptor(owner, type, name, f);
+                return new AnyFieldDescriptor(owner, type, name, f,repository);
 
             } else if (java.rmi.Remote.class.isAssignableFrom(type) 
                     || java.rmi.Remote.class.equals(type))
             {
-                return new RemoteFieldDescriptor(owner, type, name, f);
+                return new RemoteFieldDescriptor(owner, type, name, f, repository);
 
             } else if (String.class.equals(type)) {
-                return new StringFieldDescriptor(owner, type, name, f);
+                return new StringFieldDescriptor(owner, type, name, f, repository);
 
             } else if (java.io.Serializable.class.isAssignableFrom(type)) {
-                return new ValueFieldDescriptor(owner, type, name, f);
+                return new ValueFieldDescriptor(owner, type, name, f, repository);
             } else if (type.isInterface() && type.getMethods().length > 0) {
                 // interface classes that define methods 
-                return new ValueFieldDescriptor(owner, type, name, f);
+                return new ValueFieldDescriptor(owner, type, name, f, repository);
             } else {
-                return new ObjectFieldDescriptor(owner, type, name, f);
+                return new ObjectFieldDescriptor(owner, type, name, f, repository);
             }
         }
     }
 
     void print(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
-        pw.print(getJavaName());
+        pw.print(java_name);
         pw.print("=");
         try {
             Object obj = field.get(val);
             if (obj == null) {
                 pw.print("null");
             } else {
-                TypeDescriptor desc = getTypeRepository().getDescriptor(
-                        obj.getClass());
+                TypeDescriptor desc = repo.getDescriptor(obj.getClass());
                 desc.print(pw, recurse, obj);
             }
         } catch (IllegalAccessException ex) {
@@ -212,8 +210,8 @@ class RemoteFieldDescriptor extends FieldDescriptor {
     Class interfaceType;
 
     RemoteFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
 
         if (type.isInterface()) {
             interfaceType = type;
@@ -289,14 +287,14 @@ class RemoteFieldDescriptor extends FieldDescriptor {
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         java.rmi.Remote value = (java.rmi.Remote) reader
                 .readRemoteObject(interfaceType);
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        java.rmi.Remote value = (java.rmi.Remote) map.get(getJavaName());
+        java.rmi.Remote value = (java.rmi.Remote) map.get(java_name);
         writer.writeRemoteObject(value);
     }
 
@@ -309,8 +307,8 @@ class AnyFieldDescriptor extends FieldDescriptor {
     boolean narrowValue;
 
     AnyFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
         narrowValue = java.rmi.Remote.class.isAssignableFrom(type);
     }
 
@@ -369,14 +367,14 @@ class AnyFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         org.omg.CORBA.Any value = (org.omg.CORBA.Any) reader.readAny();
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        org.omg.CORBA.Any value = (org.omg.CORBA.Any) map.get(getJavaName());
+        org.omg.CORBA.Any value = (org.omg.CORBA.Any) map.get(java_name);
         writer.writeAny(value);
     }
 
@@ -384,8 +382,8 @@ class AnyFieldDescriptor extends FieldDescriptor {
 
 class ValueFieldDescriptor extends FieldDescriptor {
     ValueFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -431,7 +429,7 @@ class ValueFieldDescriptor extends FieldDescriptor {
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         java.io.Serializable value = (java.io.Serializable) reader
                 .readValueObject();
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
@@ -439,7 +437,7 @@ class ValueFieldDescriptor extends FieldDescriptor {
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
         java.io.Serializable value = (java.io.Serializable) map
-                .get(getJavaName());
+                .get(java_name);
         writer.writeValueObject(value);
     }
 
@@ -447,8 +445,8 @@ class ValueFieldDescriptor extends FieldDescriptor {
 
 class StringFieldDescriptor extends FieldDescriptor {
     StringFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -483,14 +481,14 @@ class StringFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         String value = (String) reader.readValueObject();
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        String value = (String) map.get(getJavaName());
+        String value = (String) map.get(java_name);
         writer.writeValueObject(value);
     }
 
@@ -498,8 +496,8 @@ class StringFieldDescriptor extends FieldDescriptor {
 
 class ObjectFieldDescriptor extends FieldDescriptor {
     ObjectFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -545,14 +543,14 @@ class ObjectFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         Object value = (Object) reader.readAbstractObject();
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        Object value = (Object) map.get(getJavaName());
+        Object value = (Object) map.get(java_name);
         writer.writeObject(value);
     }
 
@@ -560,8 +558,8 @@ class ObjectFieldDescriptor extends FieldDescriptor {
 
 class BooleanFieldDescriptor extends FieldDescriptor {
     BooleanFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -601,7 +599,7 @@ class BooleanFieldDescriptor extends FieldDescriptor {
 
     void print(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         try {
-            pw.print(getJavaName());
+            pw.print(java_name);
             pw.print("=");
             pw.print(field.getBoolean(val));
         } catch (IllegalAccessException ex) {
@@ -613,14 +611,14 @@ class BooleanFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         Boolean value = new Boolean(reader.readBoolean());
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        Boolean value = (Boolean) map.get(getJavaName());
+        Boolean value = (Boolean) map.get(java_name);
         if (value == null) {
             writer.writeBoolean(false);
         } else {
@@ -632,8 +630,8 @@ class BooleanFieldDescriptor extends FieldDescriptor {
 
 class ByteFieldDescriptor extends FieldDescriptor {
     ByteFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -673,7 +671,7 @@ class ByteFieldDescriptor extends FieldDescriptor {
 
     void print(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         try {
-            pw.print(getJavaName());
+            pw.print(java_name);
             pw.print("=");
             pw.print(field.getByte(val));
         } catch (IllegalAccessException ex) {
@@ -685,14 +683,14 @@ class ByteFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         Byte value = new Byte(reader.readByte());
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        Byte value = (Byte) map.get(getJavaName());
+        Byte value = (Byte) map.get(java_name);
         if (value == null) {
             writer.writeByte(0);
         } else {
@@ -704,8 +702,8 @@ class ByteFieldDescriptor extends FieldDescriptor {
 
 class ShortFieldDescriptor extends FieldDescriptor {
     ShortFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -745,7 +743,7 @@ class ShortFieldDescriptor extends FieldDescriptor {
 
     void print(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         try {
-            pw.print(getJavaName());
+            pw.print(java_name);
             pw.print("=");
             pw.print(field.getShort(val));
         } catch (IllegalAccessException ex) {
@@ -757,14 +755,14 @@ class ShortFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         Short value = new Short(reader.readShort());
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        Short value = (Short) map.get(getJavaName());
+        Short value = (Short) map.get(java_name);
         if (value == null) {
             writer.writeShort(0);
         } else {
@@ -776,8 +774,8 @@ class ShortFieldDescriptor extends FieldDescriptor {
 
 class CharFieldDescriptor extends FieldDescriptor {
     CharFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -817,7 +815,7 @@ class CharFieldDescriptor extends FieldDescriptor {
 
     void print(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         try {
-            pw.print(getJavaName());
+            pw.print(java_name);
             pw.print("=");
             char ch = field.getChar(val);
             pw.print(ch);
@@ -833,14 +831,14 @@ class CharFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         Character value = new Character(reader.readChar());
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        Character value = (Character) map.get(getJavaName());
+        Character value = (Character) map.get(java_name);
         if (value == null) {
             writer.writeChar(0);
         } else {
@@ -852,8 +850,8 @@ class CharFieldDescriptor extends FieldDescriptor {
 
 class IntFieldDescriptor extends FieldDescriptor {
     IntFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -894,7 +892,7 @@ class IntFieldDescriptor extends FieldDescriptor {
 
     void print(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         try {
-            pw.print(getJavaName());
+            pw.print(java_name);
             pw.print("=");
             pw.print(field.getInt(val));
         } catch (IllegalAccessException ex) {
@@ -906,14 +904,14 @@ class IntFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         Integer value = new Integer(reader.readInt());
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        Integer value = (Integer) map.get(getJavaName());
+        Integer value = (Integer) map.get(java_name);
         if (value == null) {
             writer.writeInt(0);
         } else {
@@ -925,8 +923,8 @@ class IntFieldDescriptor extends FieldDescriptor {
 
 class LongFieldDescriptor extends FieldDescriptor {
     LongFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -967,7 +965,7 @@ class LongFieldDescriptor extends FieldDescriptor {
 
     void print(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         try {
-            pw.print(getJavaName());
+            pw.print(java_name);
             pw.print("=");
             pw.print(field.getLong(val));
         } catch (IllegalAccessException ex) {
@@ -979,14 +977,14 @@ class LongFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         Long value = new Long(reader.readLong());
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        Long value = (Long) map.get(getJavaName());
+        Long value = (Long) map.get(java_name);
         if (value == null) {
             writer.writeLong(0);
         } else {
@@ -998,8 +996,8 @@ class LongFieldDescriptor extends FieldDescriptor {
 
 class FloatFieldDescriptor extends FieldDescriptor {
     FloatFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -1039,7 +1037,7 @@ class FloatFieldDescriptor extends FieldDescriptor {
 
     void print(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         try {
-            pw.print(getJavaName());
+            pw.print(java_name);
             pw.print("=");
             pw.print(field.getFloat(val));
         } catch (IllegalAccessException ex) {
@@ -1051,14 +1049,14 @@ class FloatFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         Float value = new Float(reader.readFloat());
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        Float value = (Float) map.get(getJavaName());
+        Float value = (Float) map.get(java_name);
         if (value == null) {
             writer.writeFloat(0.0F);
         } else {
@@ -1070,8 +1068,8 @@ class FloatFieldDescriptor extends FieldDescriptor {
 
 class DoubleFieldDescriptor extends FieldDescriptor {
     DoubleFieldDescriptor(Class owner, Class type, String name,
-            java.lang.reflect.Field f) {
-        super(owner, type, name, f);
+            java.lang.reflect.Field f, TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     public void read(ObjectReader reader, Object obj)
@@ -1111,7 +1109,7 @@ class DoubleFieldDescriptor extends FieldDescriptor {
 
     void print(java.io.PrintWriter pw, java.util.Map recurse, Object val) {
         try {
-            pw.print(getJavaName());
+            pw.print(java_name);
             pw.print("=");
             pw.print(field.getDouble(val));
         } catch (IllegalAccessException ex) {
@@ -1123,14 +1121,14 @@ class DoubleFieldDescriptor extends FieldDescriptor {
      */
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         Double value = new Double(reader.readDouble());
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
     }
 
     /**
      * @see org.apache.yoko.rmi.impl.FieldDescriptor#writeField(ObjectWriter, Map)
      */
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        Double value = (Double) map.get(getJavaName());
+        Double value = (Double) map.get(java_name);
         if (value == null) {
             writer.writeDouble(0.0D);
         } else {
@@ -1142,8 +1140,8 @@ class DoubleFieldDescriptor extends FieldDescriptor {
 
 class CorbaObjectFieldDescriptor extends FieldDescriptor {
 
-    protected CorbaObjectFieldDescriptor(Class owner, Class type, String name, Field f) {
-        super(owner, type, name, f);
+    protected CorbaObjectFieldDescriptor(Class owner, Class type, String name, Field f,TypeRepository repository) {
+        super(owner, type, name, f, repository);
     }
 
     void copyState(final Object orig, final Object copy, CopyState state) {
@@ -1175,7 +1173,7 @@ class CorbaObjectFieldDescriptor extends FieldDescriptor {
 
     void readFieldIntoMap(ObjectReader reader, Map map) throws IOException {
         Object value = reader.readCorbaObject(null);
-        map.put(getJavaName(), value);
+        map.put(java_name, value);
 
     }
 
@@ -1189,7 +1187,7 @@ class CorbaObjectFieldDescriptor extends FieldDescriptor {
     }
 
     void writeFieldFromMap(ObjectWriter writer, Map map) throws IOException {
-        org.omg.CORBA.Object value = (org.omg.CORBA.Object) map.get(getJavaName());
+        org.omg.CORBA.Object value = (org.omg.CORBA.Object) map.get(java_name);
         writer.writeCorbaObject(value);
 
     }

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/IDLEntityDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/IDLEntityDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/IDLEntityDescriptor.java
index 442f724..d7228d6 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/IDLEntityDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/IDLEntityDescriptor.java
@@ -23,7 +23,7 @@ import java.lang.reflect.Method;
 
 import org.omg.CORBA.MARSHAL;
 
-public class IDLEntityDescriptor extends ValueDescriptor {
+class IDLEntityDescriptor extends ValueDescriptor {
     Method _read_method;
 
     Method _write_method;

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/MethodDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/MethodDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/MethodDescriptor.java
index dbde88c..749bfe9 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/MethodDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/MethodDescriptor.java
@@ -69,9 +69,8 @@ public final class MethodDescriptor extends ModelElement {
     }
 
     MethodDescriptor(java.lang.reflect.Method method, TypeRepository repository) {
+        super(repository, method.getName());
         reflected_method = method;
-        setTypeRepository(repository);
-        setJavaName(method.getName());
     }
 
     /** The number of arguments */
@@ -121,7 +120,7 @@ public final class MethodDescriptor extends ModelElement {
             }
 
         } else if (copyWithinState) {
-            CopyState state = new CopyState(getTypeRepository());
+            CopyState state = new CopyState(repo);
             for (int i = 0; i < args.length; i++) {
                 if (parameter_types[i].copyWithinState()) {
                     try {
@@ -167,7 +166,7 @@ public final class MethodDescriptor extends ModelElement {
             }
 
         } else if (copyWithinState) {
-            CopyState state = new CopyState(getTypeRepository());
+            CopyState state = new CopyState(repo);
             try {
                 return state.copy(result);
             } catch (CopyRecursionException e) {
@@ -330,8 +329,7 @@ public final class MethodDescriptor extends ModelElement {
 
         for (int i = 0; i < param_types.length; i++) {
             try {
-                parameter_types[i] = getTypeRepository().getDescriptor(
-                        param_types[i]);
+                parameter_types[i] = repo.getDescriptor(param_types[i]);
                 copyWithinState |= parameter_types[i].copyWithinState();
 
             } catch (RuntimeException ex) {
@@ -340,13 +338,12 @@ public final class MethodDescriptor extends ModelElement {
         }
 
         Class result_type = reflected_method.getReturnType();
-        return_type = getTypeRepository().getDescriptor(result_type);
+        return_type = repo.getDescriptor(result_type);
 
         Class[] exc_types = reflected_method.getExceptionTypes();
         exception_types = new ExceptionDescriptor[exc_types.length];
         for (int i = 0; i < exc_types.length; i++) {
-            exception_types[i] = (ExceptionDescriptor) getTypeRepository()
-                    .getDescriptor(exc_types[i]);
+            exception_types[i] = (ExceptionDescriptor) repo.getDescriptor(exc_types[i]);
         }
 
         parameter_count = param_types.length;
@@ -361,7 +358,7 @@ public final class MethodDescriptor extends ModelElement {
         } else if (isGetterMethod()) {
             idl_name = "_get_" + transformIdentifier(attributeName());
         } else {
-            idl_name = transformIdentifier(getJavaName());
+            idl_name = transformIdentifier(java_name);
         }
 
         if (isCaseSensitive) {
@@ -376,7 +373,7 @@ public final class MethodDescriptor extends ModelElement {
     }
 
     private String attributeName() {
-        String methodName = getJavaName();
+        String methodName = java_name;
         StringBuffer buf = new StringBuffer();
 
         int pfxLen;
@@ -542,7 +539,7 @@ public final class MethodDescriptor extends ModelElement {
         writeJavaType(pw, reflected_method.getReturnType());
 
         pw.print(' ');
-        pw.print(getJavaName());
+        pw.print(java_name);
 
         pw.print(" (");
         Class[] args = reflected_method.getParameterTypes();
@@ -597,7 +594,7 @@ public final class MethodDescriptor extends ModelElement {
 
         Class[] args = reflected_method.getParameterTypes();
         for (int i = 0; i < args.length; i++) {
-            TypeDescriptor desc = getTypeRepository().getDescriptor(args[i]);
+            TypeDescriptor desc = repo.getDescriptor(args[i]);
             pw.print("\t\t\t");
             desc.writeMarshalValue(pw, "out", "arg" + i);
             pw.println(";");
@@ -613,7 +610,7 @@ public final class MethodDescriptor extends ModelElement {
             writeJavaType(pw, rtype);
             pw.print(")");
 
-            TypeDescriptor desc = getTypeRepository().getDescriptor(rtype);
+            TypeDescriptor desc = repo.getDescriptor(rtype);
             desc.writeUnmarshalValue(pw, "in");
             pw.println(";");
         }
@@ -631,8 +628,7 @@ public final class MethodDescriptor extends ModelElement {
                 continue;
             }
 
-            ExceptionDescriptor exd = (ExceptionDescriptor) getTypeRepository()
-                    .getDescriptor(ex[i]);
+            ExceptionDescriptor exd = (ExceptionDescriptor) repo.getDescriptor(ex[i]);
 
             pw.println("\t\t\tif (exname.equals(\""
                     + exd.getExceptionRepositoryID() + "\"))");
@@ -676,7 +672,7 @@ public final class MethodDescriptor extends ModelElement {
         // copy arguments
         Class[] args = reflected_method.getParameterTypes();
         if (args.length == 1) {
-            if (getTypeRepository().getDescriptor(args[0]).copyInStub()) {
+            if (repo.getDescriptor(args[0]).copyInStub()) {
                 pw.print("\t\t\t\targ0 = (");
                 writeJavaType(pw, args[0]);
                 pw.println(")" + UTIL + ".copyObject(arg0, _orb());");
@@ -686,7 +682,7 @@ public final class MethodDescriptor extends ModelElement {
             int copyCount = 0;
 
             for (int i = 0; i < args.length; i++) {
-                TypeDescriptor td = getTypeRepository().getDescriptor(args[i]);
+                TypeDescriptor td = repo.getDescriptor(args[i]);
                 copy[i] = td.copyInStub();
                 if (copy[i]) {
                     copyCount += 1;
@@ -727,7 +723,7 @@ public final class MethodDescriptor extends ModelElement {
         pw.print("((");
         writeJavaType(pw, thisClass);
         pw.print(")so.servant).");
-        pw.print(getJavaName());
+        pw.print(java_name);
         pw.print("(");
 
         for (int i = 0; i < args.length; i++) {
@@ -741,7 +737,7 @@ public final class MethodDescriptor extends ModelElement {
 
         pw.print("\t\t\t\treturn ");
         if (out != Void.TYPE) {
-            TypeDescriptor td = getTypeRepository().getDescriptor(out);
+            TypeDescriptor td = repo.getDescriptor(out);
             if (td.copyInStub()) {
                 pw.print('(');
                 writeJavaType(pw, out);
@@ -761,22 +757,21 @@ public final class MethodDescriptor extends ModelElement {
     }
 
     void addDependencies(java.util.Set classes) {
-        TypeRepository rep = getTypeRepository();
 
         TypeDescriptor desc = null;
 
-        desc = rep.getDescriptor(reflected_method.getReturnType());
+        desc = repo.getDescriptor(reflected_method.getReturnType());
         desc.addDependencies(classes);
 
         Class[] param = reflected_method.getParameterTypes();
         for (int i = 0; i < param.length; i++) {
-            desc = rep.getDescriptor(param[i]);
+            desc = repo.getDescriptor(param[i]);
             desc.addDependencies(classes);
         }
 
         Class[] ex = reflected_method.getExceptionTypes();
         for (int i = 0; i < ex.length; i++) {
-            desc = rep.getDescriptor(ex[i]);
+            desc = repo.getDescriptor(ex[i]);
             desc.addDependencies(classes);
         }
     }

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ModelElement.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ModelElement.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ModelElement.java
index 703d6b5..24a3c59 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ModelElement.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ModelElement.java
@@ -18,11 +18,15 @@
 
 package org.apache.yoko.rmi.impl;
 
-public class ModelElement {
-    protected String idl_name;        // fully resolved package name
-    protected String type_name = "";       // the simple type name (minus package, if any)
-    protected String package_name = "";    // the package name qualifier (if any)
-    protected String java_name;       // the java name of the type 
+abstract class ModelElement {
+    protected final TypeRepository repo;
+    protected final String java_name;       // the java name of the type
+    private String idl_name;        // fully resolved package name
+
+    protected ModelElement(TypeRepository repo, String java_name) {
+        this.repo = repo;
+        this.java_name = java_name;
+    }
 
     protected void setIDLName(String name) {
         idl_name = name;
@@ -31,38 +35,4 @@ public class ModelElement {
     public String getIDLName() {
         return idl_name;
     }
-
-    protected void setTypeName(String name) {
-        type_name = name;
-    }
-    
-    public String getTypeName() {
-        return type_name;
-    }
-
-    protected void setPackageName(String name) {
-        package_name = name;
-    }
-    
-    public String getPackageName() {
-        return package_name;
-    }
-
-    protected void setJavaName(String name) {
-        java_name = name;
-    }
-
-    public String getJavaName() {
-        return java_name;
-    }
-
-    protected TypeRepository repository;
-
-    protected void setTypeRepository(TypeRepository repository) {
-        this.repository = repository;
-    }
-
-    public TypeRepository getTypeRepository() {
-        return repository;
-    }
 }

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RMIStubDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RMIStubDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RMIStubDescriptor.java
index 09332cd..20fb38c 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RMIStubDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RMIStubDescriptor.java
@@ -18,7 +18,7 @@
 
 package org.apache.yoko.rmi.impl;
 
-public class RMIStubDescriptor extends ValueDescriptor {
+class RMIStubDescriptor extends ValueDescriptor {
     RMIStubDescriptor(Class type, TypeRepository repository) {
         super(type, repository);
     }

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteClassDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteClassDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteClassDescriptor.java
index 4d86d50..1116043 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteClassDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteClassDescriptor.java
@@ -18,7 +18,7 @@
 
 package org.apache.yoko.rmi.impl;
 
-public class RemoteClassDescriptor extends RemoteDescriptor {
+class RemoteClassDescriptor extends RemoteDescriptor {
 
     public String getRepositoryID() {
         return "IDL:" + getJavaClass().getName().replace('.', '/') + ":1.0";

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteDescriptor.java
index fd44426..8aafb16 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteDescriptor.java
@@ -34,7 +34,7 @@ import java.util.logging.Level;
 
 import javax.rmi.PortableRemoteObject;
 
-public abstract class RemoteDescriptor extends TypeDescriptor {
+abstract class RemoteDescriptor extends TypeDescriptor {
     private java.util.Map method_map;
 
     private java.util.Map refl_method_map;
@@ -61,8 +61,7 @@ public abstract class RemoteDescriptor extends TypeDescriptor {
             }
             Class most_specific_interface = remotes[0];
 
-            result = (RemoteInterfaceDescriptor) repository
-                    .getDescriptor(most_specific_interface);
+            result = (RemoteInterfaceDescriptor)repo.getDescriptor(most_specific_interface);
         }
 
         setRemoteInterface(result);
@@ -84,7 +83,7 @@ public abstract class RemoteDescriptor extends TypeDescriptor {
             int len = ifaces.length;
             String[] ids = new String[len];
             for (int i = 0; i < len; i++) {
-                TypeDescriptor desc = repository.getDescriptor(ifaces[i]);
+                TypeDescriptor desc = repo.getDescriptor(ifaces[i]);
                 ids[i] = desc.getRepositoryID();
             }
 
@@ -180,8 +179,7 @@ public abstract class RemoteDescriptor extends TypeDescriptor {
             if (!REMOTE_CLASS.equals(iface) && !OBJECT_CLASS.equals(iface)
                     && REMOTE_CLASS.isAssignableFrom(iface)
                     && iface.isInterface()) {
-                RemoteDescriptor superHelper = (RemoteDescriptor) repository
-                        .getDescriptor(iface);
+                RemoteDescriptor superHelper = (RemoteDescriptor)repo.getDescriptor(iface);
 
                 super_descriptors.add(superHelper);
 
@@ -217,9 +215,9 @@ public abstract class RemoteDescriptor extends TypeDescriptor {
         }
 
         for (int i = 0; i < methods.length; i++) {
-            MethodDescriptor op = new MethodDescriptor(methods[i], repository);
+            MethodDescriptor op = new MethodDescriptor(methods[i], repo);
 
-            String mname = op.getJavaName();
+            String mname = op.java_name;
 
             // is there another method that differs only in case?
             Set same_case_names = (Set) lower_case_names.get(mname.toLowerCase());
@@ -242,7 +240,7 @@ public abstract class RemoteDescriptor extends TypeDescriptor {
         method_map = new java.util.HashMap();
         for (int i = 0; i < method_list.size(); i++) {
             MethodDescriptor desc = (MethodDescriptor) method_list.get(i);
-            logger.finer("Adding method " + desc.getJavaName() + " to method map under " + desc.getIDLName()); 
+            logger.finer("Adding method " + desc.java_name + " to method map under " + desc.getIDLName());
             method_map.put(desc.getIDLName(), desc);
         }
 
@@ -545,14 +543,13 @@ public abstract class RemoteDescriptor extends TypeDescriptor {
         classes.add(c);
 
         if (c.getSuperclass() != null) {
-            TypeDescriptor desc = getTypeRepository().getDescriptor(
-                    c.getSuperclass());
+            TypeDescriptor desc = repo.getDescriptor(c.getSuperclass());
             desc.addDependencies(classes);
         }
 
         Class[] ifaces = c.getInterfaces();
         for (int i = 0; i < ifaces.length; i++) {
-            TypeDescriptor desc = getTypeRepository().getDescriptor(ifaces[i]);
+            TypeDescriptor desc = repo.getDescriptor(ifaces[i]);
             desc.addDependencies(classes);
         }
 

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteInterfaceDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteInterfaceDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteInterfaceDescriptor.java
index 072fcee..c053fd5 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteInterfaceDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/RemoteInterfaceDescriptor.java
@@ -18,7 +18,7 @@
 
 package org.apache.yoko.rmi.impl;
 
-public class RemoteInterfaceDescriptor extends RemoteDescriptor {
+class RemoteInterfaceDescriptor extends RemoteDescriptor {
     RemoteInterfaceDescriptor(Class type, TypeRepository repository) {
         super(type, repository);
     }

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/SimpleDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/SimpleDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/SimpleDescriptor.java
index ada58a7..eddf015 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/SimpleDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/SimpleDescriptor.java
@@ -18,11 +18,10 @@
 
 package org.apache.yoko.rmi.impl;
 
-public abstract class SimpleDescriptor extends TypeDescriptor {
+abstract class SimpleDescriptor extends TypeDescriptor {
     SimpleDescriptor(Class type, TypeRepository repository, String idl_name,
             org.omg.CORBA.TCKind tc) {
         super(type, repository);
-        setJavaName(type.getName());
         setIDLName(idl_name);
         // the simple type name is the same as the IDL name.  The 
         // package name is null 

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/StringDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/StringDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/StringDescriptor.java
index 2ee1f00..26a2dce 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/StringDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/StringDescriptor.java
@@ -18,7 +18,7 @@
 
 package org.apache.yoko.rmi.impl;
 
-public class StringDescriptor extends ValueDescriptor {
+class StringDescriptor extends ValueDescriptor {
     public String getIDLName() {
         return "CORBA_WStringValue";
     }

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeDescriptor.java
index 78303c9..5c01684 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/TypeDescriptor.java
@@ -27,7 +27,7 @@ import java.util.logging.Logger;
 
 import org.omg.CORBA.portable.InputStream;
 
-public abstract class TypeDescriptor extends ModelElement {
+abstract class TypeDescriptor extends ModelElement {
     static Logger logger = Logger.getLogger(TypeDescriptor.class.getName());
 
     protected final Class _java_class;
@@ -38,6 +38,22 @@ public abstract class TypeDescriptor extends ModelElement {
 
     private FullKey _key;
 
+    private String package_name = "";    // the package name qualifier (if any)
+    protected void setPackageName(String name) {
+        package_name = name;
+    }
+    public String getPackageName() {
+        return package_name;
+    }
+
+    private String type_name = "";       // the simple type name (minus package, if any)
+    protected void setTypeName(String name) {
+        type_name = name;
+    }
+    public String getTypeName() {
+        return type_name;
+    }
+
     public Class getJavaClass() {
         return _java_class;
     }
@@ -106,9 +122,9 @@ public abstract class TypeDescriptor extends ModelElement {
     }
 
     protected TypeDescriptor(Class type, TypeRepository repository) {
+        super(repository, type.getName());
         _java_class = type;
-        String typeName = type.getName(); 
-        setTypeRepository(repository);
+        String typeName = type.getName();
         setIDLName(typeName.replace('.', '_'));
         // break up the simple type and package
         int idx = typeName.lastIndexOf('.');

http://git-wip-us.apache.org/repos/asf/geronimo-yoko/blob/6e0a2827/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java
----------------------------------------------------------------------
diff --git a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java
index ecedcbb..a5dde95 100755
--- a/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java
+++ b/yoko-rmi-impl/src/main/java/org/apache/yoko/rmi/impl/ValueDescriptor.java
@@ -70,7 +70,7 @@ import org.omg.SendingContext.RunTime;
 
 import sun.reflect.ReflectionFactory;
 
-public class ValueDescriptor extends TypeDescriptor {
+class ValueDescriptor extends TypeDescriptor {
     static final Logger logger = Logger.getLogger(ValueDescriptor.class.getName());
 
     private boolean _is_externalizable;
@@ -182,7 +182,7 @@ public class ValueDescriptor extends TypeDescriptor {
         _is_immutable_value = _immutable_value_classes.contains(type);
 
         if ((superClass != null) && (superClass != Object.class)) {
-            TypeDescriptor superDesc = getTypeRepository().getDescriptor(superClass);
+            TypeDescriptor superDesc = repo.getDescriptor(superClass);
 
             if (superDesc instanceof ValueDescriptor) {
                 _super_descriptor = (ValueDescriptor) superDesc;
@@ -320,7 +320,7 @@ public class ValueDescriptor extends TypeDescriptor {
                             _constructor = ReflectionFactory.getReflectionFactory().newConstructorForSerialization(type, init_cons);
 
                             if (_constructor == null) {
-                                logger.warning("Unable to get constructor for serialization for class " + getJavaName());
+                                logger.warning("Unable to get constructor for serialization for class " + java_name);
                             } else {
                                 _constructor.setAccessible(true);
                             }
@@ -353,8 +353,7 @@ public class ValueDescriptor extends TypeDescriptor {
                             }
 
                             f.setAccessible(true);
-                            FieldDescriptor fd = FieldDescriptor.get(f);
-                            fd.setTypeRepository(getTypeRepository());
+                            FieldDescriptor fd = FieldDescriptor.get(f, repo);
                             flist.add(fd);
                         }
 
@@ -380,16 +379,14 @@ public class ValueDescriptor extends TypeDescriptor {
                             rf.setAccessible(true);
 
                             if (rf.getType() == f.getType()) {
-                                fd = FieldDescriptor.get(rf);
+                                fd = FieldDescriptor.get(rf,repo);
                             }
                         } catch (SecurityException | NoSuchFieldException ex) {
                         }
 
                         if (fd == null) {
-                            fd = FieldDescriptor.get(type, f);
+                            fd = FieldDescriptor.get(type, f, repo);
                         }
-
-                        fd.setTypeRepository(getTypeRepository());
                         _fields[i] = fd;
                     }
 
@@ -519,7 +516,7 @@ public class ValueDescriptor extends TypeDescriptor {
         }
 
         for (int i = 0; i < fields.length; i++) {
-            logger.finer("writing field " + _fields[i].getJavaName());
+            logger.finer("writing field " + _fields[i].java_name);
 
             fields[i].write(writer, val);
         }
@@ -661,7 +658,7 @@ public class ValueDescriptor extends TypeDescriptor {
 
         for (FieldDescriptor _field : _fields) {
 
-            logger.fine("reading field " + _field.getJavaName() + " of type " + _field.getType().getName() + " using " + _field.getClass().getName());
+            logger.fine("reading field " + _field.java_name + " of type " + _field.getType().getName() + " using " + _field.getClass().getName());
 
             try {
                 _field.read(reader, value);
@@ -669,7 +666,7 @@ public class ValueDescriptor extends TypeDescriptor {
                 if (ex.getMessage() != null)
                     throw ex;
 
-                String msg = String.format("%s, while reading %s.%s", ex, getJavaName(), _field.getJavaName());
+                String msg = String.format("%s, while reading %s.%s", ex, java_name, _field.java_name);
                 throw (MARSHAL) new MARSHAL(msg, ex.minor, ex.completed).initCause(ex);
             }
         }
@@ -686,7 +683,7 @@ public class ValueDescriptor extends TypeDescriptor {
 
         for (FieldDescriptor _field : _fields) {
 
-            logger.finer("reading field " + _field.getJavaName());
+            logger.finer("reading field " + _field.java_name);
 
             _field.readFieldIntoMap(reader, map);
         }
@@ -703,7 +700,7 @@ public class ValueDescriptor extends TypeDescriptor {
 
         for (FieldDescriptor _field : _fields) {
 
-            logger.finer("writing field " + _field.getJavaName());
+            logger.finer("writing field " + _field.java_name);
 
             _field.writeFieldFromMap(writer, fieldMap);
         }
@@ -786,7 +783,7 @@ public class ValueDescriptor extends TypeDescriptor {
 
             Class superType = type.getSuperclass();
             if (superType != null) {
-                TypeDescriptor desc = getTypeRepository().getDescriptor(superType);
+                TypeDescriptor desc = repo.getDescriptor(superType);
                 out.writeLong(desc.getHashCode());
             }
 
@@ -802,7 +799,7 @@ public class ValueDescriptor extends TypeDescriptor {
                 Arrays.sort(fds, compareByName);
 
             for (FieldDescriptor f : fds) {
-                out.writeUTF(f.getJavaName());
+                out.writeUTF(f.java_name);
                 out.writeUTF(makeSignature(f.getType()));
             }
 
@@ -831,8 +828,8 @@ public class ValueDescriptor extends TypeDescriptor {
 
     private static final Comparator compareByName = new Comparator() {
         public int compare(Object f1, Object f2) {
-            String n1 = ((FieldDescriptor) f1).getJavaName();
-            String n2 = ((FieldDescriptor) f2).getJavaName();
+            String n1 = ((FieldDescriptor) f1).java_name;
+            String n2 = ((FieldDescriptor) f2).java_name;
             return n1.compareTo(n2);
         }
     };
@@ -849,7 +846,7 @@ public class ValueDescriptor extends TypeDescriptor {
         if (_value_members == null) {
             _value_members = new ValueMember[_fields.length];
             for (int i = 0; i < _fields.length; i++) {
-                _value_members[i] = _fields[i].getValueMember(getTypeRepository());
+                _value_members[i] = _fields[i].getValueMember(repo);
             }
         }
 
@@ -867,7 +864,7 @@ public class ValueDescriptor extends TypeDescriptor {
 
         Class javaClass = getJavaClass();
         if (javaClass.isArray()) {
-            TypeDescriptor desc = getTypeRepository().getDescriptor(javaClass.getComponentType());
+            TypeDescriptor desc = repo.getDescriptor(javaClass.getComponentType());
             _type_code = desc.getTypeCode();
             _type_code = orb.create_sequence_tc(0, _type_code);
             _type_code = orb.create_value_box_tc(getRepositoryID(), "Sequence", _type_code);
@@ -926,12 +923,12 @@ public class ValueDescriptor extends TypeDescriptor {
             fields = new FieldDescriptor[members.length];
             for (int i = 0; i < members.length; i++) {
                 Class type = getClassFromTypeCode(members[i].type);
-                fields[i] = FieldDescriptor.get(myClass, type, members[i].name, null);
+                fields[i] = FieldDescriptor.get(myClass, type, members[i].name, null, repo);
             }
 
             if (!"".equals(desc.base_value)) {
                 Class clz = ValueHandlerImpl.getClassFromRepositoryID(desc.base_value);
-                TypeDescriptor tdesc = getTypeRepository().getDescriptor(clz);
+                TypeDescriptor tdesc = repo.getDescriptor(clz);
 
                 if ((tdesc instanceof ValueDescriptor)) {
                     super_descriptor = ((ValueDescriptor) tdesc).getObjectDeserializer(desc.base_value, runtime);
@@ -979,7 +976,7 @@ public class ValueDescriptor extends TypeDescriptor {
         if (oorig == orig) {
             wdesc = this;
         } else {
-            wdesc = (ValueDescriptor) getTypeRepository().getDescriptor(oorig.getClass());
+            wdesc = (ValueDescriptor) repo.getDescriptor(oorig.getClass());
 
             logger.finer("writeReplace -> " + getJavaClass().getName());
         }
@@ -1062,13 +1059,13 @@ public class ValueDescriptor extends TypeDescriptor {
         classes.add(c);
 
         if (c.getSuperclass() != null) {
-            TypeDescriptor desc = getTypeRepository().getDescriptor(c.getSuperclass());
+            TypeDescriptor desc = repo.getDescriptor(c.getSuperclass());
             desc.addDependencies(classes);
         }
 
         Class[] ifaces = c.getInterfaces();
         for (Class iface : ifaces) {
-            TypeDescriptor desc = getTypeRepository().getDescriptor(iface);
+            TypeDescriptor desc = repo.getDescriptor(iface);
             desc.addDependencies(classes);
         }
 
@@ -1077,7 +1074,7 @@ public class ValueDescriptor extends TypeDescriptor {
                 if (_field.isPrimitive())
                     continue;
 
-                TypeDescriptor desc = getTypeRepository().getDescriptor(_field.type);
+                TypeDescriptor desc = repo.getDescriptor(_field.type);
                 desc.addDependencies(classes);
             }
         }


Mime
View raw message