hotspot/src/share/vm/runtime/reflection.hpp
changeset 2332 5c7b6f4ce0a1
parent 1 489c9b5090e2
child 5547 f4b087cbb361
equal deleted inserted replaced
2259:d3c946e7f127 2332:5c7b6f4ce0a1
     1 /*
     1 /*
     2  * Copyright 1997-2006 Sun Microsystems, Inc.  All Rights Reserved.
     2  * Copyright 1997-2009 Sun Microsystems, Inc.  All Rights Reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    85                                       klassOop field_class,
    85                                       klassOop field_class,
    86                                       AccessFlags access,
    86                                       AccessFlags access,
    87                                       bool classloader_only,
    87                                       bool classloader_only,
    88                                       bool protected_restriction = false);
    88                                       bool protected_restriction = false);
    89   static bool     is_same_class_package(klassOop class1, klassOop class2);
    89   static bool     is_same_class_package(klassOop class1, klassOop class2);
       
    90   static bool     is_same_package_member(klassOop class1, klassOop class2, TRAPS);
    90 
    91 
    91   static bool can_relax_access_check_for(
    92   static bool can_relax_access_check_for(
    92     klassOop accessor, klassOop accesee, bool classloader_only);
    93     klassOop accessor, klassOop accesee, bool classloader_only);
    93 
    94 
    94   // inner class reflection
    95   // inner class reflection
    95   static void check_for_inner_class(instanceKlassHandle outer, instanceKlassHandle inner, TRAPS);
    96   // raise an ICCE unless the required relationship can be proven to hold
       
    97   // If inner_is_member, require the inner to be a member of the outer.
       
    98   // If !inner_is_member, require the inner to be anonymous (a non-member).
       
    99   // Caller is responsible for figuring out in advance which case must be true.
       
   100   static void check_for_inner_class(instanceKlassHandle outer, instanceKlassHandle inner,
       
   101                                     bool inner_is_member, TRAPS);
    96 
   102 
    97   //
   103   //
    98   // Support for reflection based on dynamic bytecode generation (JDK 1.4)
   104   // Support for reflection based on dynamic bytecode generation (JDK 1.4)
    99   //
   105   //
   100 
   106