[Biojava-dev] biojava v2 alpha1 release

Michael Heuer heuermh at acm.org
Wed May 5 16:59:26 EDT 2004


fixed a few more generics type errors, see attached diff.

Now I'm just missing one of the annotation classes

    [javac]
/home/heuer/working/bjv2/trunk/data/src/org/bjv2/gql/Or.java:75: cannot
find symbol
    [javac] symbol  : class Override
    [javac] location: class org.bjv2.gql.Or<T>
    [javac]   @Override
    [javac]    ^

   michael
-------------- next part --------------
Index: core/src/org/bjv2/util/WeakValueHashMap.java
===================================================================
--- core/src/org/bjv2/util/WeakValueHashMap.java	(revision 26)
+++ core/src/org/bjv2/util/WeakValueHashMap.java	(working copy)
@@ -53,16 +53,16 @@
         extends AbstractMap<K,V>

 {

   private final Map<K, Reference<V>> keyToRefMap;

-  private final ReferenceQueue queue;

+  private final ReferenceQueue<V> queue;

   private final Set iteratorRefs;

-  private final ReferenceQueue iteratorRefQueue;

+  private final ReferenceQueue<V> iteratorRefQueue;

 

   public WeakValueHashMap()

   {

     keyToRefMap = new HashMap<K, Reference<V>>();

-    queue = new ReferenceQueue();

+    queue = new ReferenceQueue<V>();

     iteratorRefs = new HashSet();

-    iteratorRefQueue = new ReferenceQueue();

+    iteratorRefQueue = new ReferenceQueue<V>();

   }

 

   private void diddleReferenceQueue()

Index: data/src/org/bjv2/gql/Evaluator.java
===================================================================
--- data/src/org/bjv2/gql/Evaluator.java	(revision 26)
+++ data/src/org/bjv2/gql/Evaluator.java	(working copy)
@@ -427,7 +427,7 @@
         items.add(child);

       }

     }

-    return new Or<T>(new ArrayList(items));

+    return new Or<T>(new ArrayList<Filter<T>>(items));

   }

 

   private static <T> Set<Filter<T>> optimize(

Index: data/src/org/bjv2/integrator/Integrators.java
===================================================================
--- data/src/org/bjv2/integrator/Integrators.java	(revision 26)
+++ data/src/org/bjv2/integrator/Integrators.java	(working copy)
@@ -12,7 +12,7 @@
   Integrator<UserType> createIntegrator(Class<UserType> userType)

           throws IntrospectionException

   {

-    UserIntrospector userIntrospector = UserIntrospector.forClass(userType);

+    UserIntrospector<UserType> userIntrospector = UserIntrospector.forClass(userType);

     switch (userIntrospector.getPrimaryKey().size()) {

       case 0:

         return new NoKeyIntegrator<UserType>(userIntrospector);

Index: data/src/org/bjv2/integrator/PropertyMappings.java
===================================================================
--- data/src/org/bjv2/integrator/PropertyMappings.java	(revision 26)
+++ data/src/org/bjv2/integrator/PropertyMappings.java	(working copy)
@@ -46,8 +46,8 @@
             (PropertyMapping<UserType, DataType>) mappings.get(gopher);

 

     if(mapping == null) {

-      UserIntrospector ui = UserIntrospector.forClass(userType);

-      DataIntrospector di = DataIntrospector.forClass(dataType);

+      UserIntrospector<UserType> ui = UserIntrospector.forClass(userType);

+      DataIntrospector<DataType> di = DataIntrospector.forClass(dataType);

 

       //System.out.println("\t" + ui.getDataType());

       //System.out.println("\t" + di.getDataType());

Index: bytecode/src/org/bjv2/util/bytecode/IntrospectedCodeClass.java
===================================================================
--- bytecode/src/org/bjv2/util/bytecode/IntrospectedCodeClass.java	(revision 26)
+++ bytecode/src/org/bjv2/util/bytecode/IntrospectedCodeClass.java	(working copy)
@@ -168,10 +168,10 @@
   private void initMethods()

   {

     if (_methods == null) {

-      Map meths = new HashMap();

+      Map meths = new HashMap<Object,CodeMethod>();

       popMeths(this.clazz, meths);

       popIMeths(this.clazz, meths);

-      _methods = new HashSet<CodeMethod>(meths.values());

+      _methods = new HashSet<CodeMethod>((Collection<CodeMethod>) meths.values());

       _methsByNameSig = new HashMap<Object, CodeMethod>();

       _methsByName = new HashMap<String, Set<CodeMethod>>();

       for(CodeMethod m: _methods) {



More information about the biojava-dev mailing list