/[classpath]/classpath/java/io/ObjectStreamClass.java
ViewVC logotype

Diff of /classpath/java/io/ObjectStreamClass.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.19 by mark, Fri Jan 3 23:46:17 2003 UTC revision 1.20 by mark, Fri Jan 17 16:45:28 2003 UTC
# Line 525  public class ObjectStreamClass implement Line 525  public class ObjectStreamClass implement
525        }        }
526    
527        // write class initializer method if present        // write class initializer method if present
528        if (hasClassInitializer (cl))        if (VMObjectStreamClass.hasClassInitializer (cl))
529        {        {
530          data_out.writeUTF ("<clinit>");          data_out.writeUTF ("<clinit>");
531          data_out.writeInt (Modifier.STATIC);          data_out.writeInt (Modifier.STATIC);
# Line 613  public class ObjectStreamClass implement Line 613  public class ObjectStreamClass implement
613      return o;      return o;
614    }    }
615    
   
   // Returns true if CLAZZ has a static class initializer  
   // (a.k.a. <clinit>).  
   private static boolean hasClassInitializer (Class clazz)  
   {  
     Method m = null;  
   
     try  
       {  
         /*  
          * There exists a problem here, according to the spec  
          * clazz.getDeclaredMethod ("<clinit>", classArgs);  
          * will always throw NoSuchMethodException, even if the static  
          * intializer does exist.  
          */  
         Class classArgs[] = {};  
         m = clazz.getDeclaredMethod ("<clinit>", classArgs);  
       }  
     catch (java.lang.NoSuchMethodException e)  
       {  
       }  
   
     return m != null;  
   }  
   
616    public static final ObjectStreamField[] NO_FIELDS = {};    public static final ObjectStreamField[] NO_FIELDS = {};
617    
618    private static Hashtable classLookupTable = new Hashtable ();    private static Hashtable classLookupTable = new Hashtable ();

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26