logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Nice/src/bossa/syntax JavaClasses.java,1.38,1.39 ClassDefinition.java,1.95,: msg#00073

Subject: Nice/src/bossa/syntax JavaClasses.java,1.38,1.39 ClassDefinition.java,1.95,1.96
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1:/tmp/cvs-serv18471/src/bossa/syntax

Modified Files:
        JavaClasses.java ClassDefinition.java 
Log Message:
Allow classes of all variances to be serializable.


Index: JavaClasses.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/JavaClasses.java,v
retrieving revision 1.38
retrieving revision 1.39
diff -C2 -d -r1.38 -r1.39
*** JavaClasses.java    17 Oct 2003 15:25:50 -0000      1.38
--- JavaClasses.java    24 Oct 2003 11:24:17 -0000      1.39
***************
*** 80,84 ****
    
    private static boolean excluded(gnu.bytecode.Type[] blackList, 
!                                 ClassType classType)
    {
      for(int i=0; i<blackList.length; i++)
--- 80,84 ----
    
    private static boolean excluded(gnu.bytecode.Type[] blackList, 
!                                 Type classType)
    {
      for(int i=0; i<blackList.length; i++)
***************
*** 88,91 ****
--- 88,97 ----
    }
        
+   static boolean excludedInterface(TypeConstructor itf)
+   {
+     gnu.bytecode.Type t = nice.tools.code.Types.get(itf);
+     return excluded(blackListInterface, t);
+   }
+ 
    private static TypeConstructor create
      (Compilation compilation, String className, gnu.bytecode.Type javaType)

Index: ClassDefinition.java
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/ClassDefinition.java,v
retrieving revision 1.95
retrieving revision 1.96
diff -C2 -d -r1.95 -r1.96
*** ClassDefinition.java        13 Sep 2003 00:39:53 -0000      1.95
--- ClassDefinition.java        24 Oct 2003 11:24:18 -0000      1.96
***************
*** 308,319 ****
        if (javaInterfaces != null)
          for (int i = 0; i < javaInterfaces.length; i++)
!           try {
!             Typing.initialLeq(tc, javaInterfaces[i]);
!           }
!           catch(KindingEx e){
!             User.error(name,
!                        "Class " + name + " cannot implement " + e.t2 +
!                        ": they do not have the same number or kind of type 
parameters");
!           }
        }
        catch(TypingEx e){
--- 308,320 ----
        if (javaInterfaces != null)
          for (int i = 0; i < javaInterfaces.length; i++)
!             if (! (JavaClasses.excludedInterface(javaInterfaces[i])))
!               try {
!                 Typing.initialLeq(tc, javaInterfaces[i]);
!               }
!               catch(KindingEx e){
!                 User.error(name,
!                            "Class " + name + " cannot implement " + e.t2 +
!                            ": they do not have the same number or kind of 
type parameters");
!               }
        }
        catch(TypingEx e){




-------------------------------------------------------
This SF.net email is sponsored by: The SF.net Donation Program.
Do you like what SourceForge.net is doing for the Open
Source Community?  Make a contribution, and help us add new
features and functionality. Click here: http://sourceforge.net/donate/


<Prev in Thread] Current Thread [Next in Thread>