You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2015/03/23 23:17:49 UTC

svn commit: r1668751 [2/2] - in /uima/uimaj/trunk/uimaj-core: ./ src/main/java/org/apache/uima/cas/ src/main/java/org/apache/uima/cas/impl/ src/main/java/org/apache/uima/impl/ src/main/java/org/apache/uima/jcas/ src/main/java/org/apache/uima/jcas/cas/ ...

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArray_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArray_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArray_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerArray_Type.java Mon Mar 23 22:17:47 2015
@@ -21,11 +21,8 @@ package org.apache.uima.jcas.cas;
 
 // import java.lang.reflect.Constructor;
 
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 
 // *********************************
@@ -42,27 +39,28 @@ public class IntegerArray_Type extends C
    */
   public final static int typeIndexID = IntegerArray.typeIndexID;
 
-  // generator used by the CAS system when it needs to make a new instance
-
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+//  // generator used by the CAS system when it needs to make a new instance
+//
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (instanceOf_Type.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = instanceOf_Type.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new IntegerArray(addr, instanceOf_Type);
-          instanceOf_Type.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new IntegerArray(addr, instanceOf_Type);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    @SuppressWarnings("unchecked")
+//    public IntegerArray createFS(int addr, CASImpl cas) {
+//      if (instanceOf_Type.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        IntegerArray fs = instanceOf_Type.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new IntegerArray(addr, instanceOf_Type);
+//          instanceOf_Type.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new IntegerArray(addr, instanceOf_Type);
+//    }
+//  };
 
   private IntegerArray_Type() {
   } // block default new operator
@@ -71,7 +69,7 @@ public class IntegerArray_Type extends C
     super(jcas, casType);
     // Do not factor to TOP_Type - requires access to instance values
     // which are not set when super is called (per JVM spec)
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
   }
 
   // ******************************************************

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerList_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerList_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerList_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/IntegerList_Type.java Mon Mar 23 22:17:47 2015
@@ -19,34 +19,32 @@
 
 package org.apache.uima.jcas.cas;
 
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 public class IntegerList_Type extends org.apache.uima.jcas.cas.TOP_Type {
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (IntegerList_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = IntegerList_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new IntegerList(addr, IntegerList_Type.this);
-          IntegerList_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new IntegerList(addr, IntegerList_Type.this);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    @SuppressWarnings("unchecked")
+//    public IntegerList createFS(int addr, CASImpl cas) {
+//      if (IntegerList_Type.this.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        IntegerList fs = (IntegerList) IntegerList_Type.this.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new IntegerList(addr, IntegerList_Type.this);
+//          IntegerList_Type.this.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new IntegerList(addr, IntegerList_Type.this);
+//    }
+//  };
 
   public final static int typeIndexID = IntegerList.typeIndexID;
 
@@ -55,7 +53,7 @@ public class IntegerList_Type extends or
   // * initialize variables to correspond with Cas Type and Features
   public IntegerList_Type(JCas jcas, Type casType) {
     super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
 
   }
 

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/LongArray_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/LongArray_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/LongArray_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/LongArray_Type.java Mon Mar 23 22:17:47 2015
@@ -19,11 +19,8 @@
 
 package org.apache.uima.jcas.cas;
 
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 
 // *********************************
@@ -39,27 +36,27 @@ public final class LongArray_Type extend
    */
   public final static int typeIndexID = LongArray.typeIndexID;
 
-  // generator used by the CAS system when it needs to make a new instance
-
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+//  // generator used by the CAS system when it needs to make a new instance
+//
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (LongArray_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = LongArray_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new LongArray(addr, LongArray_Type.this);
-          LongArray_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new LongArray(addr, LongArray_Type.this);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    public FeatureStructure createFS(int addr, CASImpl cas) {
+//      if (LongArray_Type.this.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        FeatureStructure fs = LongArray_Type.this.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new LongArray(addr, LongArray_Type.this);
+//          LongArray_Type.this.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new LongArray(addr, LongArray_Type.this);
+//    }
+//  };
 
   private LongArray_Type() {
   } // block default new operator
@@ -68,7 +65,7 @@ public final class LongArray_Type extend
     super(jcas, casType);
     // Do not factor to TOP_Type - requires access to instance values
     // which are not set when super is called (per JVM spec)
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
   }
 
   // ******************************************************

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyFSList_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyFSList_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyFSList_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyFSList_Type.java Mon Mar 23 22:17:47 2015
@@ -20,35 +20,33 @@
 package org.apache.uima.jcas.cas;
 
 import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
 import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 public class NonEmptyFSList_Type extends FSList_Type {
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (instanceOf_Type.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = instanceOf_Type.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new NonEmptyFSList(addr, instanceOf_Type);
-          instanceOf_Type.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new NonEmptyFSList(addr, instanceOf_Type);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    @SuppressWarnings("unchecked")
+//    public NonEmptyFSList createFS(int addr, CASImpl cas) {
+//      if (instanceOf_Type.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        NonEmptyFSList fs = instanceOf_Type.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new NonEmptyFSList(addr, instanceOf_Type);
+//          instanceOf_Type.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new NonEmptyFSList(addr, instanceOf_Type);
+//    }
+//  };
 
   public final static int typeIndexID = NonEmptyFSList.typeIndexID;
 
@@ -89,7 +87,7 @@ public class NonEmptyFSList_Type extends
   // * initialize variables to correspond with Cas Type and Features
   public NonEmptyFSList_Type(JCas jcas, Type casType) {
     super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
 
     casFeat_head = jcas.getRequiredFeatureDE(casType, "head", "uima.cas.TOP", featOkTst);
     casFeatCode_head = (null == casFeat_head) ? JCas.INVALID_FEATURE_CODE

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyFloatList_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyFloatList_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyFloatList_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyFloatList_Type.java Mon Mar 23 22:17:47 2015
@@ -20,35 +20,32 @@
 package org.apache.uima.jcas.cas;
 
 import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
 import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 public class NonEmptyFloatList_Type extends FloatList_Type {
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (instanceOf_Type.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = instanceOf_Type.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new NonEmptyFloatList(addr, instanceOf_Type);
-          instanceOf_Type.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new NonEmptyFloatList(addr, instanceOf_Type);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    public FeatureStructure createFS(int addr, CASImpl cas) {
+//      if (instanceOf_Type.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        FeatureStructure fs = instanceOf_Type.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new NonEmptyFloatList(addr, instanceOf_Type);
+//          instanceOf_Type.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new NonEmptyFloatList(addr, instanceOf_Type);
+//    }
+//  };
 
   public final static int typeIndexID = NonEmptyFloatList.typeIndexID;
 
@@ -89,7 +86,7 @@ public class NonEmptyFloatList_Type exte
   // * initialize variables to correspond with Cas Type and Features
   public NonEmptyFloatList_Type(JCas jcas, Type casType) {
     super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
 
     casFeat_head = jcas.getRequiredFeatureDE(casType, "head", "uima.cas.Float", featOkTst);
     casFeatCode_head = (null == casFeat_head) ? JCas.INVALID_FEATURE_CODE

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyIntegerList_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyIntegerList_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyIntegerList_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyIntegerList_Type.java Mon Mar 23 22:17:47 2015
@@ -20,35 +20,32 @@
 package org.apache.uima.jcas.cas;
 
 import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
 import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 public class NonEmptyIntegerList_Type extends IntegerList_Type {
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (instanceOf_Type.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = instanceOf_Type.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new NonEmptyIntegerList(addr, instanceOf_Type);
-          instanceOf_Type.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new NonEmptyIntegerList(addr, instanceOf_Type);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    public FeatureStructure createFS(int addr, CASImpl cas) {
+//      if (instanceOf_Type.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        FeatureStructure fs = instanceOf_Type.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new NonEmptyIntegerList(addr, instanceOf_Type);
+//          instanceOf_Type.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new NonEmptyIntegerList(addr, instanceOf_Type);
+//    }
+//  };
 
   public final static int typeIndexID = NonEmptyIntegerList.typeIndexID;
 
@@ -89,7 +86,7 @@ public class NonEmptyIntegerList_Type ex
   // * initialize variables to correspond with Cas Type and Features
   public NonEmptyIntegerList_Type(JCas jcas, Type casType) {
     super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
 
     casFeat_head = jcas.getRequiredFeatureDE(casType, "head", "uima.cas.Integer", featOkTst);
     casFeatCode_head = (null == casFeat_head) ? JCas.INVALID_FEATURE_CODE

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyStringList_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyStringList_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyStringList_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/NonEmptyStringList_Type.java Mon Mar 23 22:17:47 2015
@@ -20,35 +20,33 @@
 package org.apache.uima.jcas.cas;
 
 import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
 import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 public class NonEmptyStringList_Type extends StringList_Type {
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (instanceOf_Type.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = instanceOf_Type.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new NonEmptyStringList(addr, instanceOf_Type);
-          instanceOf_Type.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new NonEmptyStringList(addr, instanceOf_Type);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    @SuppressWarnings("unchecked")
+//    public NonEmptyStringList createFS(int addr, CASImpl cas) {
+//      if (instanceOf_Type.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        NonEmptyStringList fs = instanceOf_Type.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new NonEmptyStringList(addr, instanceOf_Type);
+//          instanceOf_Type.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new NonEmptyStringList(addr, instanceOf_Type);
+//    }
+//  };
 
   public final static int typeIndexID = NonEmptyStringList.typeIndexID;
 
@@ -89,7 +87,7 @@ public class NonEmptyStringList_Type ext
   // * initialize variables to correspond with Cas Type and Features
   public NonEmptyStringList_Type(JCas jcas, Type casType) {
     super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
 
     casFeat_head = jcas.getRequiredFeatureDE(casType, "head", "uima.cas.String", featOkTst);
     casFeatCode_head = (null == casFeat_head) ? JCas.INVALID_FEATURE_CODE

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ShortArray_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ShortArray_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ShortArray_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/ShortArray_Type.java Mon Mar 23 22:17:47 2015
@@ -19,11 +19,8 @@
 
 package org.apache.uima.jcas.cas;
 
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 
 // *********************************
@@ -39,27 +36,27 @@ public final class ShortArray_Type exten
    */
   public final static int typeIndexID = ShortArray.typeIndexID;
 
-  // generator used by the CAS system when it needs to make a new instance
-
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+//  // generator used by the CAS system when it needs to make a new instance
+//
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (ShortArray_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = ShortArray_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new ShortArray(addr, ShortArray_Type.this);
-          ShortArray_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new ShortArray(addr, ShortArray_Type.this);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    public FeatureStructure createFS(int addr, CASImpl cas) {
+//      if (ShortArray_Type.this.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        FeatureStructure fs = ShortArray_Type.this.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new ShortArray(addr, ShortArray_Type.this);
+//          ShortArray_Type.this.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new ShortArray(addr, ShortArray_Type.this);
+//    }
+//  };
 
   private ShortArray_Type() {
   } // block default new operator
@@ -68,7 +65,7 @@ public final class ShortArray_Type exten
     super(jcas, casType);
     // Do not factor to TOP_Type - requires access to instance values
     // which are not set when super is called (per JVM spec)
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
   }
 
   // ******************************************************

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/Sofa_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/Sofa_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/Sofa_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/Sofa_Type.java Mon Mar 23 22:17:47 2015
@@ -20,12 +20,9 @@
 package org.apache.uima.jcas.cas;
 
 import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
 import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
@@ -35,27 +32,27 @@ import org.apache.uima.jcas.JCasRegistry
  * @generated
  */
 public class Sofa_Type extends TOP_Type {
-  /** @generated */
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+//  /** @generated */
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  /** @generated */
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (Sofa_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = Sofa_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new Sofa(addr, Sofa_Type.this);
-          Sofa_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new Sofa(addr, Sofa_Type.this);
-    }
-  };
+//
+//  /** @generated */
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    public FeatureStructure createFS(int addr, CASImpl cas) {
+//      if (Sofa_Type.this.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        FeatureStructure fs = Sofa_Type.this.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new Sofa(addr, Sofa_Type.this);
+//          Sofa_Type.this.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new Sofa(addr, Sofa_Type.this);
+//    }
+//  };
 
   /** @generated */
   public final static int typeIndexID = Sofa.typeIndexID;
@@ -93,7 +90,7 @@ public class Sofa_Type extends TOP_Type
    */
   public Sofa_Type(JCas jcas, Type casType) {
     super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
 
     casFeat_sofaNum = jcas.getRequiredFeatureDE(casType, "sofaNum", "uima.cas.Integer", featOkTst);
     casFeatCode_sofaNum = (null == casFeat_sofaNum) ? JCas.INVALID_FEATURE_CODE

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringArray_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringArray_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringArray_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringArray_Type.java Mon Mar 23 22:17:47 2015
@@ -19,11 +19,8 @@
 
 package org.apache.uima.jcas.cas;
 
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 
 // *********************************
@@ -40,27 +37,28 @@ public final class StringArray_Type exte
    */
   public final static int typeIndexID = StringArray.typeIndexID;
 
-  // generator used by the CAS system when it needs to make a new instance
-
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+//  // generator used by the CAS system when it needs to make a new instance
+//
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (StringArray_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = StringArray_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new StringArray(addr, StringArray_Type.this);
-          StringArray_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new StringArray(addr, StringArray_Type.this);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    @SuppressWarnings("unchecked")
+//    public StringArray createFS(int addr, CASImpl cas) {
+//      if (StringArray_Type.this.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        StringArray fs = StringArray_Type.this.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new StringArray(addr, StringArray_Type.this);
+//          StringArray_Type.this.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new StringArray(addr, StringArray_Type.this);
+//    }
+//  };
 
   private StringArray_Type() {
   } // block default new operator
@@ -69,7 +67,7 @@ public final class StringArray_Type exte
     super(jcas, casType);
     // Do not factor to TOP_Type - requires access to instance values
     // which are not set when super is called (per JVM spec)
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
   }
 
   // ******************************************************

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringList_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringList_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringList_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/StringList_Type.java Mon Mar 23 22:17:47 2015
@@ -19,34 +19,32 @@
 
 package org.apache.uima.jcas.cas;
 
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
-import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 public class StringList_Type extends org.apache.uima.jcas.cas.TOP_Type {
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (StringList_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = StringList_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new StringList(addr, StringList_Type.this);
-          StringList_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new StringList(addr, StringList_Type.this);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    @SuppressWarnings("unchecked")
+//    public StringList createFS(int addr, CASImpl cas) {
+//      if (StringList_Type.this.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        StringList fs = StringList_Type.this.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new StringList(addr, StringList_Type.this);
+//          StringList_Type.this.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new StringList(addr, StringList_Type.this);
+//    }
+//  };
 
   public final static int typeIndexID = StringList.typeIndexID;
 
@@ -55,7 +53,7 @@ public class StringList_Type extends org
   // * initialize variables to correspond with Cas Type and Features
   public StringList_Type(JCas jcas, Type casType) {
     super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//     casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
 
   }
 

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/TOP_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/TOP_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/TOP_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/cas/TOP_Type.java Mon Mar 23 22:17:47 2015
@@ -20,7 +20,6 @@
 package org.apache.uima.jcas.cas;
 
 import org.apache.uima.cas.CASRuntimeException;
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
 import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
@@ -88,25 +87,26 @@ public class TOP_Type {
 	// new subtypes of TOP_Type use <class-name>.this instead
 	protected final TOP_Type instanceOf_Type; // allow ref to this in inner class
 
-	protected FSGenerator getFSGenerator() {
-		return fsGenerator;
-	}
-
-	private FSGenerator fsGenerator = new FSGenerator() {
-		public FeatureStructure createFS(int addr, CASImpl cas) {
-			if (TOP_Type.this.useExistingInstance) {
-				// Return eq fs instance if already created
-				FeatureStructure fs = TOP_Type.this.jcas.getJfsFromCaddr(addr);
-				if (null == fs) {
-					fs = new TOP(addr, TOP_Type.this);
-					TOP_Type.this.jcas.putJfsFromCaddr(addr, fs);
-					return fs;
-				}
-				return fs;
-			} else
-				return new TOP(addr, TOP_Type.this);
-		}
-	};
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
+  }
+//
+//	private FSGenerator fsGenerator = new FSGenerator() {
+//		@SuppressWarnings("unchecked")
+//    public TOP createFS(int addr, CASImpl cas) {
+//			if (TOP_Type.this.useExistingInstance) {
+//				// Return eq fs instance if already created
+//				TOP fs = TOP_Type.this.jcas.getJfsFromCaddr(addr);
+//				if (null == fs) {
+//					fs = new TOP(addr, TOP_Type.this);
+//					TOP_Type.this.jcas.putJfsFromCaddr(addr, fs);
+//					return fs;
+//				}
+//				return fs;
+//			} else
+//				return new TOP(addr, TOP_Type.this);
+//		}
+//	};
 
 	// cas.getKnownJCas().getType(TOP.typeIndexID));}
 
@@ -169,10 +169,10 @@ public class TOP_Type {
 		// during the super calls will incorrectly set the generator for the casType, but
 		// this is OK because after the supers all run, the bottom one runs and sets it correctly.
 
-		if (installGenerator) {
-			((CASImpl) ll_cas).getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType,
-					getFSGenerator());
-		}
+//		if (installGenerator) {
+//			((CASImpl) ll_cas).getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType,
+//					getFSGenerator());
+//		}
 	}
 
 	// ************ No Object support ********************

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JCasHashMap.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JCasHashMap.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JCasHashMap.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JCasHashMap.java Mon Mar 23 22:17:47 2015
@@ -24,6 +24,9 @@ import org.apache.uima.cas.impl.FeatureS
 /**
  * Version 2 (2014) of map between CAS addr and JCasCover Objects
  * 
+ * Note: in the general case, the cover object may *not* be a JCas one, but rather the general one
+ *       This happens if there is no JCas cover object defined for the type.
+ * 
  * Assumptions:  Each addr has a corresponding JCas; it is not
  * permitted to "update" an addr with a different JCas
  * cover class (unless the table is cleared first).

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JCasImpl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JCasImpl.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JCasImpl.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JCasImpl.java Mon Mar 23 22:17:47 2015
@@ -147,27 +147,36 @@ public class JCasImpl extends AbstractCa
   // * FSIndexRepository - the get method returns the java type *
   // * so FSIndexRepository can't be in the implements clause *
 
-  private static class LoadedJCasType {
+  // constant used in the following function
+  /** internal use - constant used in getting constructors */
+  final static private Class<?>[] jcasBaseAndType = new Class[] { JCas.class, Type.class };
+
+  final static private Class<?>[] intAnd_Type = new Class[] { int.class, TOP_Type.class };
+
+  
+  private static class LoadedJCasType<T extends TOP> {
     final String typeName;
 
     final int index;
 
     final boolean isSubtypeOfAnnotationBase;
 
-    final Constructor constructorFor_Type;
+    final Constructor<? extends TOP_Type> constructorFor_Type;
 
-    final Constructor constructorForType;
+    final Constructor<T> constructorForType;
 
-    LoadedJCasType(String typeName, Class _TypeClass, ClassLoader cl) {
+    LoadedJCasType(String typeName, Class<? extends TOP_Type> a_TypeClass, ClassLoader cl) {
+      Class<? extends TOP_Type> _TypeClass = a_TypeClass;
       this.typeName = typeName;
       int tempindex = 0;
       boolean tempisSubtypeOfAnnotationBase = false;
-      Constructor tempconstructorFor_Type = null;
-      Constructor tempconstructorForType = null;
+      Constructor<? extends TOP_Type> tempconstructorFor_Type = null;
+      Constructor<T> tempconstructorForType = null;
 
       String name = _TypeClass.getName();
       try {
-        Class typeClass = Class.forName(name.substring(0, name.length() - 5), true, cl); // drop
+        @SuppressWarnings("unchecked")
+        Class<T> typeClass = (Class<T>) Class.forName(name.substring(0, name.length() - 5), true, cl); // drop
         // _Type
 
         Field typeIndexField = null;
@@ -236,8 +245,8 @@ public class JCasImpl extends AbstractCa
   // This is a static map - effectively indexed by all loaded type systems and all classloaders
 
   // Access to this must be synch'd
-  private static Map<TypeSystemImpl, Map<ClassLoader, Map<String, LoadedJCasType>>> typeSystemToLoadedJCasTypesByClassLoader = 
-          new WeakHashMap<TypeSystemImpl, Map<ClassLoader, Map<String, LoadedJCasType>>>(4);
+  private static Map<TypeSystemImpl, Map<ClassLoader, Map<String, LoadedJCasType<?>>>> typeSystemToLoadedJCasTypesByClassLoader = 
+          new WeakHashMap<TypeSystemImpl, Map<ClassLoader, Map<String, LoadedJCasType<?>>>>(4);
 
   // **********************************************
   // * Data shared among views of a single CAS *
@@ -250,7 +259,11 @@ public class JCasImpl extends AbstractCa
     // ********************************************************
 
     /**
-     * key = CAS addr, value = corresponding Java instance This impl was changed in May 2007 to a
+     * key = CAS addr, value = corresponding Java instance.
+     *
+     *   The Java instance may be a JCas cover object, or a non-JCas Java cover object of type FeatureStructureImplC
+     *   
+     *This impl was changed in May 2007 to a
      * design of one cover object per CAS object, when dealing with multiple views. This implements
      * better semantics for co-located components sharing these objects - they all get to share the
      * same object, independent of which view(s) the object may be indexed in. For cases where the
@@ -318,10 +331,11 @@ public class JCasImpl extends AbstractCa
   private final boolean isUsedCache;
 
   /*
-   * typeArray is one per CAS because holds pointers to instances of _Type objects, per CAS Not in
-   * shared view, because the typeArray points to instances that go with the view. This is used when
-   * making instances - it allows each instance to be associated with a view, for purposes of making
-   * addtoIndexes() and removeFromIndexes() work. Not final, because it may need to be "extended" if
+   * typeArray is one per CAS because it holds pointers to instances of _Type objects, per CAS. 
+   * It is not in the shared view, because the typeArray points to instances that go with the view. 
+   * This is used when making instances - it allows each instance to be associated with a view, 
+   * for purposes of making addtoIndexes() and removeFromIndexes() work. 
+   * It is not final, because it may need to be "extended" if
    * alternate versions of types are loaded from different class loaders, at some point in the
    * execution. The alternate versions are given their own slots in this array.
    */
@@ -411,7 +425,7 @@ public class JCasImpl extends AbstractCa
     if (i >= typeArray.length || null == typeArray[i]) {
 
       // unknown ID. Attempt to get offending class.
-      Class cls = JCasRegistry.getClassForIndex(i);
+      Class<? extends TOP> cls = JCasRegistry.getClassForIndex(i);
       if (cls != null) {
         String typeName = cls.getName();
         // is type in type system
@@ -541,12 +555,13 @@ public class JCasImpl extends AbstractCa
    * @param cl
    * @return a Map from the string of the fully qualified type name to LoadedJCasType instances
    */
-  private synchronized Map<String, LoadedJCasType> loadJCasClasses(ClassLoader cl) {
+  @SuppressWarnings("unchecked")
+  private synchronized Map<String, LoadedJCasType<?>> loadJCasClasses(ClassLoader cl) {
     final TypeSystem ts = casImpl.getTypeSystem();
     Iterator<Type> typeIt = ts.getTypeIterator();
     TypeImpl t;
     String casName;
-    Map<String, LoadedJCasType> jcasTypes = new HashMap<String, LoadedJCasType>();
+    Map<String, LoadedJCasType<?>> jcasTypes = new HashMap<>();
 
     // * note that many of these may have already been loaded
     // * load all the others. Actually, we ask to load all the types
@@ -567,7 +582,7 @@ public class JCasImpl extends AbstractCa
         try {
           String nameBase = "org.apache.uima.jcas." + casName.substring(5);
           name_Type = nameBase + "_Type";
-          jcasTypes.put(nameBase, new LoadedJCasType(t.getName(), Class
+          jcasTypes.put(nameBase, new LoadedJCasType<>(t.getName(), (Class<? extends TOP_Type>) Class
               .forName(name_Type, true, cl), cl));
         } catch (ClassNotFoundException e1) {
           // OK for DocumentAnnotation, which may not have a cover class.
@@ -583,7 +598,7 @@ public class JCasImpl extends AbstractCa
       // as well as other JCas model types
       try {
         name_Type = casName + "_Type";
-        jcasTypes.put(casName, new LoadedJCasType(t.getName(), Class.forName(name_Type, true, cl),
+        jcasTypes.put(casName, new LoadedJCasType<>(t.getName(), (Class<? extends TOP_Type>) Class.forName(name_Type, true, cl),
             cl));
         // also force the load the plain name without _Type for
         // old-style - that's where
@@ -596,10 +611,10 @@ public class JCasImpl extends AbstractCa
     }
 
     // note: this entire method is synchronized
-    Map<ClassLoader, Map<String, LoadedJCasType>> classLoaderToLoadedJCasTypes = typeSystemToLoadedJCasTypesByClassLoader.get(casImpl
+    Map<ClassLoader, Map<String, LoadedJCasType<?>>> classLoaderToLoadedJCasTypes = typeSystemToLoadedJCasTypesByClassLoader.get(casImpl
         .getTypeSystemImpl());
     if (null == classLoaderToLoadedJCasTypes) {
-      classLoaderToLoadedJCasTypes = new WeakHashMap<ClassLoader, Map<String, LoadedJCasType>>(4);
+      classLoaderToLoadedJCasTypes = new WeakHashMap<ClassLoader, Map<String, LoadedJCasType<?>>>(4);
       typeSystemToLoadedJCasTypesByClassLoader.put(casImpl.getTypeSystemImpl(),
           classLoaderToLoadedJCasTypes);
     }
@@ -620,14 +635,14 @@ public class JCasImpl extends AbstractCa
   }
 
   public void instantiateJCas_Types(ClassLoader cl) {
-    Map<String, LoadedJCasType> loadedJCasTypes = null;
+    Map<String, LoadedJCasType<?>> loadedJCasTypes = null;
     FSClassRegistry fscr = casImpl.getFSClassRegistry();
     boolean alreadyLoaded;  // means the "classes" have been loaded, but doesn't mean
                             // the _Type instances of those classes have been created.
     boolean anyNewInstances = false;  // true if any new instances of _Type are generated
-    FSGenerator[] newFSGeneratorSet;
+    FSGenerator<?>[] newFSGeneratorSet;
     synchronized (JCasImpl.class) {
-      Map<ClassLoader, Map<String, LoadedJCasType>> classLoaderToLoadedJCasTypes = typeSystemToLoadedJCasTypesByClassLoader.get(casImpl
+      Map<ClassLoader, Map<String, LoadedJCasType<?>>> classLoaderToLoadedJCasTypes = typeSystemToLoadedJCasTypesByClassLoader.get(casImpl
           .getTypeSystemImpl());
       if (null != classLoaderToLoadedJCasTypes) {
         loadedJCasTypes = classLoaderToLoadedJCasTypes.get(cl);
@@ -641,8 +656,8 @@ public class JCasImpl extends AbstractCa
       // if already loaded, can skip making new generators - 
       //   in this case newFSGeneratorSet is never referenced
       //   Set it to null for "safety"
-      newFSGeneratorSet = alreadyLoaded ? null : fscr.getNewFSGeneratorSet();
-      for (Iterator<Map.Entry<String, LoadedJCasType>> it = loadedJCasTypes.entrySet().iterator(); it.hasNext();) {
+      newFSGeneratorSet = (alreadyLoaded ? null : fscr.getNewFSGeneratorSet());
+      for (Iterator<Map.Entry<String, LoadedJCasType<?>>> it = loadedJCasTypes.entrySet().iterator(); it.hasNext();) {
         
         // Explanation for this logic:
         //   Instances of _Types are kept per class loader, per Cas (e.g., in the cas pool)
@@ -674,7 +689,7 @@ public class JCasImpl extends AbstractCa
   }
 
   // note all callers are synchronized
-  private void copyDownSuperGenerators(Map<String, LoadedJCasType> jcasTypes, FSGenerator[] fsGenerators) {
+  private void copyDownSuperGenerators(Map<String, LoadedJCasType<?>> jcasTypes, FSGenerator<?>[] fsGenerators) {
     final TypeSystem ts = casImpl.getTypeSystem();
     Iterator<Type> typeIt = ts.getTypeIterator(); // reset iterator to start
     Type topType = ts.getTopType();
@@ -790,14 +805,14 @@ public class JCasImpl extends AbstractCa
   // (lazily) instantiate the xxx_Type object if needed (due to switching class loaders:
   // see comment under getType(int))
 
-  static private class JCasFsGenerator implements FSGenerator {
+  static private class JCasFsGenerator<T extends TOP> implements FSGenerator<T> {
     // multiple reader threads in same CAS
     static final ThreadLocal<Object[]> initArgsThreadLocal = new ThreadLocal<Object[]>() {
       protected Object[] initialValue() { return new Object[2]; } };
 
     private final int type;
 
-    private final Constructor c;
+    private final Constructor<T> c;
 
     private final boolean isSubtypeOfAnnotationBase;
 
@@ -806,7 +821,7 @@ public class JCasImpl extends AbstractCa
     private final int annotSofaFeatCode;
     
 
-    JCasFsGenerator(int type, Constructor c, boolean isSubtypeOfAnnotationBase,
+    JCasFsGenerator(int type, Constructor<T> c, boolean isSubtypeOfAnnotationBase,
         int sofaNbrFeatCode, int annotSofaFeatCode) {
       this.type = type;
       this.c = c;
@@ -815,14 +830,21 @@ public class JCasImpl extends AbstractCa
       this.annotSofaFeatCode = annotSofaFeatCode;
     }
 
+    /*
+     * Called from the CAS's this.svd.localFsGenerators 
+     * 
+     * Those are set up with either JCas style generators, or the
+     * the shared common instances of FeatureStructureImplC for non-JCas classes.
+     * 
+     */
     // Called in 3 cases
-    // 1) a non-JCas call to create a new FS
-    // 2) a dereference of an existing FS
+    // 1) a non-JCas call to create a new JCas style FS 
+    // 2) a dereference of an existing FS 
     // 3) an iterator
-    public FeatureStructure createFS(int addr, CASImpl casView) {
+    public T createFS(int addr, CASImpl casView) {
       try {
         JCasImpl jcasView = (JCasImpl) casView.getJCas();
-        TOP fs = jcasView.getJfsFromCaddr(addr);
+        T fs = jcasView.<T>getJfsFromCaddr(addr);
         if (null != fs) {
           fs.jcasType = jcasView.getType(type);
           return fs;
@@ -834,7 +856,7 @@ public class JCasImpl extends AbstractCa
       }
     }
   
-    private FeatureStructure doCreateFS(int addr, CASImpl casView) {
+    private T doCreateFS(int addr, CASImpl casView) {
       // this funny logic is because although the annotationView should always be set if
       // a type is a subtype of annotation, it isn't always set if an application uses low-level
       // api's. Rather than blow up, we limp along.
@@ -852,9 +874,9 @@ public class JCasImpl extends AbstractCa
         final Object[] initargs = initArgsThreadLocal.get();  
         initargs[0] = Integer.valueOf(addr);
         initargs[1] = jcasView.getType(type);
-        FeatureStructure fs = null;
+        T fs = null;
         try {
-          fs = (TOP) c.newInstance(initargs);
+          fs = (T) c.newInstance(initargs);
         } catch (IllegalArgumentException e) {
           logAndThrow(e, jcasView);
         } catch (InstantiationException e) {
@@ -898,8 +920,8 @@ public class JCasImpl extends AbstractCa
    * returns true if a new instance of a _Type class was created
    */
 
-  private boolean makeInstanceOf_Type(LoadedJCasType jcasTypeInfo, boolean alreadyLoaded,
-      FSGenerator[] fsGenerators) {
+  private <T extends TOP> boolean makeInstanceOf_Type(LoadedJCasType<T> jcasTypeInfo, boolean alreadyLoaded,
+      FSGenerator<?>[] fsGenerators) {
     
     // return without doing anything if the _Type instance is already existing
     //   this happens when a JCas has some _Type instances made (e.g, the
@@ -919,8 +941,8 @@ public class JCasImpl extends AbstractCa
       return false;
     }
     
-    Constructor c_Type = jcasTypeInfo.constructorFor_Type;
-    Constructor cType = jcasTypeInfo.constructorForType;
+    Constructor<?> c_Type = jcasTypeInfo.constructorFor_Type;
+    Constructor<T> cType = jcasTypeInfo.constructorForType;
     TypeImpl casType = (TypeImpl) casImpl.getTypeSystem().getType(jcasTypeInfo.typeName);
 
     try {
@@ -933,7 +955,7 @@ public class JCasImpl extends AbstractCa
       // Also sharable by all in a CasPool, except for "swapping" due to PEARs/Classloaders.
       if (!alreadyLoaded) {
         final TypeSystemImpl ts = casImpl.getTypeSystemImpl();
-        fsGenerators[casType.getCode()] = new JCasFsGenerator(typeIndex, cType,
+        fsGenerators[casType.getCode()] = new JCasFsGenerator<T>(typeIndex, cType,
             jcasTypeInfo.isSubtypeOfAnnotationBase, ts.sofaNumFeatCode, ts.annotSofaFeatCode);
         // this.casImpl.getFSClassRegistry().loadJCasGeneratorForType(typeIndex, cType, casType,
         // jcasTypeInfo.isSubtypeOfAnnotationBase);
@@ -1042,11 +1064,6 @@ public class JCasImpl extends AbstractCa
     throw e;
   }
 
-  // constant used in the following function
-  /** internal use - constant used in getting constructors */
-  final static private Class[] jcasBaseAndType = new Class[] { JCas.class, Type.class };
-
-  final static private Class[] intAnd_Type = new Class[] { int.class, TOP_Type.class };
 
   /*
    * (non-Javadoc)
@@ -1060,10 +1077,15 @@ public class JCasImpl extends AbstractCa
   /*
    * (non-Javadoc)
    * 
+   * Generics: extends FeatureStructure, not TOP, because
+   * when the JCas is being used, but a particular type instance doesn't have a JCas cover class,
+   * this holds instances of FeatureStructureC - the shared Class for non-JCas Java cover objects.
+   * 
    * @see org.apache.uima.jcas.JCas#getJfsFromCaddr(int)
    */
-  public TOP getJfsFromCaddr(int casAddr) {
-    return (TOP) sharedView.cAddr2Jfs.getReserve(casAddr);
+  @SuppressWarnings("unchecked")
+  public <T extends TOP> T getJfsFromCaddr(int casAddr) {
+    return (T) sharedView.cAddr2Jfs.getReserve(casAddr);
   }
 
   public void showJfsFromCaddrHistogram() {
@@ -1524,10 +1546,8 @@ public class JCasImpl extends AbstractCa
    * 
    * @see org.apache.uima.jcas.JCas#getAnnotationIndex()
    */
-  @SuppressWarnings("unchecked")
   public AnnotationIndex<Annotation> getAnnotationIndex() {
-    return (AnnotationIndex<Annotation>) (AnnotationIndex<?>) 
-            casImpl.getAnnotationIndex();
+    return casImpl.<Annotation>getAnnotationIndex();
   }
 
   /*
@@ -1535,10 +1555,9 @@ public class JCasImpl extends AbstractCa
    * 
    * @see org.apache.uima.jcas.JCas#getAnnotationIndex(org.apache.uima.cas.Type)
    */
-  @SuppressWarnings("unchecked")
   @Override
   public <T extends Annotation> AnnotationIndex<T> getAnnotationIndex(Type type) throws CASRuntimeException {
-    return (AnnotationIndex<T>) casImpl.getAnnotationIndex(type);
+    return (AnnotationIndex<T>) casImpl.<T>getAnnotationIndex(type);
   }
 
   /*
@@ -1546,9 +1565,8 @@ public class JCasImpl extends AbstractCa
    * 
    * @see org.apache.uima.jcas.JCas#getAnnotationIndex(int)
    */
-  @SuppressWarnings("unchecked")
   public <T extends Annotation> AnnotationIndex<T> getAnnotationIndex(int type) throws CASRuntimeException {
-    return (AnnotationIndex<T>) casImpl.getAnnotationIndex(this.getCasType(type));
+    return (AnnotationIndex<T>) casImpl.<T>getAnnotationIndex(this.getCasType(type));
   }
   
   public <T extends Annotation> AnnotationIndex<T> getAnnotationIndex(Class<T> clazz) {

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JFSIndexRepositoryImpl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JFSIndexRepositoryImpl.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JFSIndexRepositoryImpl.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/impl/JFSIndexRepositoryImpl.java Mon Mar 23 22:17:47 2015
@@ -24,10 +24,13 @@ import java.util.Iterator;
 import org.apache.uima.cas.FSIndex;
 import org.apache.uima.cas.FSIndexRepository;
 import org.apache.uima.cas.FSIterator;
+import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
 import org.apache.uima.cas.text.AnnotationIndex;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JFSIndexRepository;
+import org.apache.uima.jcas.cas.TOP;
+import org.apache.uima.jcas.tcas.Annotation;
 
 /**
  * 
@@ -49,7 +52,7 @@ public class JFSIndexRepositoryImpl impl
    * 
    * @see org.apache.uima.jcas.JFSIndexRepository#getIndex(java.lang.String)
    */
-  public FSIndex getIndex(String label) {
+  public <T extends TOP> FSIndex<T> getIndex(String label) {
     return fsIndexRepository.getIndex(label);
   }
 
@@ -58,7 +61,7 @@ public class JFSIndexRepositoryImpl impl
    * 
    * @see org.apache.uima.jcas.JFSIndexRepository#getIndex(java.lang.String, int)
    */
-  public FSIndex getIndex(String label, int type) {
+  public <T extends TOP> FSIndex<T> getIndex(String label, int type) {
     return fsIndexRepository.getIndex(label, jcas.getCasType(type));
   }
 
@@ -67,7 +70,7 @@ public class JFSIndexRepositoryImpl impl
    * 
    * @see org.apache.uima.jcas.JFSIndexRepository#getAnnotationIndex()
    */
-  public AnnotationIndex getAnnotationIndex() {
+  public AnnotationIndex<Annotation> getAnnotationIndex() {
     return this.jcas.getCas().getAnnotationIndex();
   }
 
@@ -76,7 +79,7 @@ public class JFSIndexRepositoryImpl impl
    * 
    * @see org.apache.uima.jcas.JFSIndexRepository#getAnnotationIndex(int)
    */
-  public AnnotationIndex getAnnotationIndex(int type) {
+  public <T extends Annotation> AnnotationIndex<T> getAnnotationIndex(int type) {
       return this.jcas.getCas().getAnnotationIndex(this.jcas.getCasType(type));
   }
 
@@ -85,7 +88,7 @@ public class JFSIndexRepositoryImpl impl
    * 
    * @see org.apache.uima.jcas.JFSIndexRepository#getLabels()
    */
-  public Iterator getLabels() {
+  public Iterator<String> getLabels() {
     return fsIndexRepository.getLabels();
   }
 
@@ -94,7 +97,8 @@ public class JFSIndexRepositoryImpl impl
    * 
    * @see org.apache.uima.jcas.JFSIndexRepository#getIndexes()
    */
-  public Iterator getIndexes() {
+  @Override
+  public Iterator<FSIndex<? extends FeatureStructure>> getIndexes() {
     return fsIndexRepository.getIndexes();
 
   }
@@ -111,14 +115,14 @@ public class JFSIndexRepositoryImpl impl
   /* (non-Javadoc)
    * @see org.apache.uima.jcas.JFSIndexRepository#getAllIndexedFS(org.apache.uima.cas.Type)
    */
-  public FSIterator getAllIndexedFS(Type aType) {
+  public FSIterator<FeatureStructure> getAllIndexedFS(Type aType) {
     return fsIndexRepository.getAllIndexedFS(aType);
   }
 
   /* (non-Javadoc)
    * @see org.apache.uima.jcas.JFSIndexRepository#getAllIndexedFS(int)
    */
-  public FSIterator getAllIndexedFS(int aType) {
+  public FSIterator<FeatureStructure> getAllIndexedFS(int aType) {
     return fsIndexRepository.getAllIndexedFS(jcas.getCasType(aType));
   }
 }

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation_Type.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation_Type.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation_Type.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/jcas/tcas/Annotation_Type.java Mon Mar 23 22:17:47 2015
@@ -20,35 +20,34 @@
 package org.apache.uima.jcas.tcas;
 
 import org.apache.uima.cas.Feature;
-import org.apache.uima.cas.FeatureStructure;
 import org.apache.uima.cas.Type;
 import org.apache.uima.cas.impl.CASImpl;
 import org.apache.uima.cas.impl.FSGenerator;
 import org.apache.uima.cas.impl.FeatureImpl;
-import org.apache.uima.cas.impl.TypeImpl;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.jcas.JCasRegistry;
 
 public class Annotation_Type extends org.apache.uima.jcas.cas.AnnotationBase_Type {
-  protected FSGenerator getFSGenerator() {
-    return fsGenerator;
+  protected FSGenerator<?> getFSGenerator() {
+    return null; // no longer used, but may be needed for compatibility with older existing JCasGen'd cover classes that might extend this class
   }
-
-  private final FSGenerator fsGenerator = new FSGenerator() {
-    public FeatureStructure createFS(int addr, CASImpl cas) {
-      if (Annotation_Type.this.useExistingInstance) {
-        // Return eq fs instance if already created
-        FeatureStructure fs = Annotation_Type.this.jcas.getJfsFromCaddr(addr);
-        if (null == fs) {
-          fs = new Annotation(addr, Annotation_Type.this);
-          Annotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
-          return fs;
-        }
-        return fs;
-      } else
-        return new Annotation(addr, Annotation_Type.this);
-    }
-  };
+//
+//  private final FSGenerator fsGenerator = new FSGenerator() {
+//    @SuppressWarnings("unchecked")
+//    public Annotation createFS(int addr, CASImpl cas) {
+//      if (Annotation_Type.this.useExistingInstance) {
+//        // Return eq fs instance if already created
+//        Annotation fs = (Annotation) Annotation_Type.this.jcas.getJfsFromCaddr(addr);
+//        if (null == fs) {
+//          fs = new Annotation(addr, Annotation_Type.this);
+//          Annotation_Type.this.jcas.putJfsFromCaddr(addr, fs);
+//          return fs;
+//        }
+//        return fs;
+//      } else
+//        return new Annotation(addr, Annotation_Type.this);
+//    }
+//  };
 
   public final static int typeIndexID = Annotation.typeIndexID;
 
@@ -103,7 +102,7 @@ public class Annotation_Type extends org
   // * initialize variables to correspond with Cas Type and Features
   public Annotation_Type(JCas jcas, Type casType) {
     super(jcas, casType);
-    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
+//    casImpl.getFSClassRegistry().addGeneratorForType((TypeImpl) this.casType, getFSGenerator());
 
     casFeat_begin = jcas.getRequiredFeatureDE(casType, "begin", "uima.cas.Integer", featOkTst);
     casFeatCode_begin = (null == casFeat_begin) ? JCas.INVALID_FEATURE_CODE

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/CasManager_impl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/CasManager_impl.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/CasManager_impl.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/impl/CasManager_impl.java Mon Mar 23 22:17:47 2015
@@ -303,18 +303,19 @@ public class CasManager_impl implements
    *          interface to get. Currently must be one of CAS or JCas.
    * @return -         
    */
-  public static AbstractCas getCasInterfaceStatic(CAS cas, Class<? extends AbstractCas> requiredInterface) {
+  @SuppressWarnings("unchecked")
+  public static <T extends AbstractCas> T getCasInterfaceStatic(CAS cas, Class<T> requiredInterface) {
     if (requiredInterface == CAS.class) {
-      return cas;
+      return (T) cas;
     } else if (requiredInterface == JCas.class) {
       try {
-        return cas.getJCas();
+        return (T) cas.getJCas();
       } catch (CASException e) {
         throw new UIMARuntimeException(e);
       }
     } else if (requiredInterface.isInstance(cas)) // covers AbstractCas
     {
-      return cas;
+      return (T) cas;
     }
     {
       throw new UIMARuntimeException(UIMARuntimeException.UNSUPPORTED_CAS_INTERFACE,

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/metadata/impl/MetaDataObject_impl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/metadata/impl/MetaDataObject_impl.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/metadata/impl/MetaDataObject_impl.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/metadata/impl/MetaDataObject_impl.java Mon Mar 23 22:17:47 2015
@@ -766,7 +766,7 @@ public abstract class MetaDataObject_imp
     // add the hash codes of all attributes
     MetaDataAttr[] attrs = getAttributes();
     for (MetaDataAttr attr : attrs) {
-      String attrName = attr.name;
+//      String attrName = attr.name;
       Object val = getAttributeValue(attr);
       if (val != null) {
         if (val instanceof Object[]) {
@@ -1433,7 +1433,7 @@ public abstract class MetaDataObject_imp
         PropertyXmlInfo[] props = getXmlizationInfo().propertyInfo;
         for (int i = 0; i < props.length; i++) {
           String propName = props[i].propertyName;
-          Class propClass = getAttributeClass(propName);
+          Class<?> propClass = getAttributeClass(propName);
           if (propClass.isAssignableFrom(valueObj.getClass())) {
             // check if we have already read a value for this attribute
             if (!aKnownPropertyNames.contains(propName)) {
@@ -1476,7 +1476,7 @@ public abstract class MetaDataObject_imp
 
   /**
    * Utility method for reading from XML an attribute whose value is a <code>Map</code> with
-   * <code>String</code> keys and <code>XMLizable</code> values.
+   * <code>String</code> keys and <code>XMLizable</code> (or an array of these) values.
    * 
    * @param aPropName
    *          name of the property to read from XML
@@ -1499,7 +1499,7 @@ public abstract class MetaDataObject_imp
           String aKeyXmlAttribute, String aValueTagName, XMLParser aParser,
           XMLParser.ParsingOptions aOptions, boolean aValueIsArray) throws InvalidXMLException {
     // get the Map to which we add entries (it should already exist)
-    Map theMap = (Map) getAttributeValue(aPropName);
+    Map<String, Object> theMap = (Map<String, Object>) getAttributeValue(aPropName);
 
     // get all child nodes
     NodeList childNodes = aElement.getChildNodes();
@@ -1529,7 +1529,7 @@ public abstract class MetaDataObject_imp
           val = aParser.buildObject(valElem, aOptions);
         } else // array
         {
-          ArrayList vals = new ArrayList();
+          ArrayList<XMLizable> vals = new ArrayList<>();
           NodeList arrayNodes = curElem.getChildNodes();
           for (int j = 0; j < arrayNodes.getLength(); j++) {
             Node curArrayNode = arrayNodes.item(j);

Modified: uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/metadata/impl/TypePriorityList_impl.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/metadata/impl/TypePriorityList_impl.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/metadata/impl/TypePriorityList_impl.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/main/java/org/apache/uima/resource/metadata/impl/TypePriorityList_impl.java Mon Mar 23 22:17:47 2015
@@ -76,7 +76,7 @@ public class TypePriorityList_impl exten
     //surprise: super.clone sets the final field to the same array list as the original
     TypePriorityList_impl clone = (TypePriorityList_impl) super.clone();
     
-    clone.mTypeNames = new ArrayList();  // because above clone has set it to the == object
+    clone.mTypeNames = new ArrayList<>();  // because above clone has set it to the == object
     for (String name : mTypeNames) {
       clone.addType(name);
     }

Modified: uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IteratorTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IteratorTest.java?rev=1668751&r1=1668750&r2=1668751&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IteratorTest.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IteratorTest.java Mon Mar 23 22:17:47 2015
@@ -248,7 +248,7 @@ public class IteratorTest extends TestCa
   }
   
   public void testGetIndexes() {
-    Iterator<FSIndex<FeatureStructure>> it = this.cas.getIndexRepository().getIndexes();
+     Iterator<FSIndex<? extends FeatureStructure>> it = this.cas.getIndexRepository().getIndexes();
     while (it.hasNext()) {
       assertNotNull(it.next());
     }