Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (22 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libjava/java/lang/Class.java

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11// Class.java - Representation of a Java class.
    22
    3 /* Copyright (C) 1998, 1999, 2000  Free Software Foundation
     3/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
    44
    55   This file is part of libgcj.
     
    6666    throws NoSuchFieldException, SecurityException;
    6767  public native Field[] getDeclaredFields () throws SecurityException;
    68   public native Method getDeclaredMethod (String methodName,
    69                                           Class[] parameterTypes)
    70     throws NoSuchMethodException, SecurityException;
     68
     69  private native Method _getDeclaredMethod (String methodName,
     70                                            Class[] parameterTypes);
     71
     72  public Method getDeclaredMethod (String methodName, Class[] parameterTypes)
     73    throws NoSuchMethodException, SecurityException
     74  {
     75    SecurityManager sm = System.getSecurityManager();
     76    if (sm != null)
     77      {
     78        sm.checkMemberAccess(this, Member.DECLARED);
     79        Package p = getPackage();
     80        if (p != null)
     81          sm.checkPackageAccess(p.getName());
     82      }
     83
     84    if ("<init>".equals(methodName) || "<clinit>".equals(methodName))
     85      throw new NoSuchMethodException(methodName);
     86
     87    Method m = _getDeclaredMethod(methodName, parameterTypes);
     88    if (m == null)
     89      throw new NoSuchMethodException (methodName);
     90    return m;
     91  }
     92
    7193  public native Method[] getDeclaredMethods () throws SecurityException;
    7294
     
    122144                                                   boolean is_construtor);
    123145
    124   public native Method getMethod (String methodName, Class[] parameterTypes)
    125     throws NoSuchMethodException, SecurityException;
     146  public native Method _getMethod (String methodName, Class[] parameterTypes);
     147
     148  public Method getMethod (String methodName, Class[] parameterTypes)
     149    throws NoSuchMethodException, SecurityException
     150  {
     151    SecurityManager sm = System.getSecurityManager();
     152    if (sm != null)
     153      {
     154        sm.checkMemberAccess(this, Member.PUBLIC);
     155        Package p = getPackage();
     156        if (p != null)
     157          sm.checkPackageAccess(p.getName());
     158      }
     159
     160    if ("<init>".equals(methodName) || "<clinit>".equals(methodName))
     161      throw new NoSuchMethodException(methodName);
     162
     163    Method m = _getMethod(methodName, parameterTypes);
     164    if (m == null)
     165      throw new NoSuchMethodException (methodName);
     166    return m;
     167  }
     168
    126169  private native int _getMethods (Method[] result, int offset);
    127170  public native Method[] getMethods () throws SecurityException;
     
    218261  }
    219262
     263
     264
     265
     266
     267
     268
     269
     270
     271
     272
     273
     274
     275
     276
     277
     278
     279
     280
     281
     282
     283
     284
     285
     286
     287
     288
     289
     290
     291
     292
     293
     294
     295
     296
     297
     298
     299
     300
     301
     302
     303
     304
     305
     306
     307
     308
     309
     310
     311
     312
     313
     314
     315
     316
     317
     318
     319
     320
     321
     322
     323
     324
     325
     326
     327
     328
     329
     330
     331
    220332  // Don't allow new classes to be made.
    221333  private Class ()
     
    236348  // finalization
    237349  protected native void finalize ();
     350
     351
     352
     353
     354
     355
     356
     357
     358
     359
     360
     361
     362
     363
    238364}
Note: See TracChangeset for help on using the changeset viewer.