86 bool classloader_only); 87 // Return an error message specific to the specified Klass*'s and result. 88 // This function must be called from within a block containing a ResourceMark. 89 static char* verify_class_access_msg(const Klass* current_class, 90 const InstanceKlass* new_class, 91 const VerifyClassAccessResults result); 92 93 static bool verify_field_access(const Klass* current_class, 94 const Klass* resolved_class, 95 const Klass* field_class, 96 AccessFlags access, 97 bool classloader_only, 98 bool protected_restriction = false); 99 static bool is_same_class_package(const Klass* class1, const Klass* class2); 100 101 // inner class reflection 102 // raise an ICCE unless the required relationship can be proven to hold 103 // If inner_is_member, require the inner to be a member of the outer. 104 // If !inner_is_member, require the inner to be anonymous (a non-member). 105 // Caller is responsible for figuring out in advance which case must be true. 106 static void check_for_inner_class(instanceKlassHandle outer, 107 instanceKlassHandle inner, 108 bool inner_is_member, 109 TRAPS); 110 111 // 112 // Support for reflection based on dynamic bytecode generation (JDK 1.4) 113 // 114 115 // Create a java.lang.reflect.Method object based on a method 116 static oop new_method(const methodHandle& method, bool for_constant_pool_access, TRAPS); 117 // Create a java.lang.reflect.Constructor object based on a method 118 static oop new_constructor(const methodHandle& method, TRAPS); 119 // Create a java.lang.reflect.Field object based on a field descriptor 120 static oop new_field(fieldDescriptor* fd, TRAPS); 121 // Create a java.lang.reflect.Parameter object based on a 122 // MethodParameterElement 123 static oop new_parameter(Handle method, int index, Symbol* sym, 124 int flags, TRAPS); 125 // Method invocation through java.lang.reflect.Method 126 static oop invoke_method(oop method_mirror, 127 Handle receiver, | 86 bool classloader_only); 87 // Return an error message specific to the specified Klass*'s and result. 88 // This function must be called from within a block containing a ResourceMark. 89 static char* verify_class_access_msg(const Klass* current_class, 90 const InstanceKlass* new_class, 91 const VerifyClassAccessResults result); 92 93 static bool verify_field_access(const Klass* current_class, 94 const Klass* resolved_class, 95 const Klass* field_class, 96 AccessFlags access, 97 bool classloader_only, 98 bool protected_restriction = false); 99 static bool is_same_class_package(const Klass* class1, const Klass* class2); 100 101 // inner class reflection 102 // raise an ICCE unless the required relationship can be proven to hold 103 // If inner_is_member, require the inner to be a member of the outer. 104 // If !inner_is_member, require the inner to be anonymous (a non-member). 105 // Caller is responsible for figuring out in advance which case must be true. 106 static void check_for_inner_class(const InstanceKlass* outer, 107 const InstanceKlass* inner, 108 bool inner_is_member, 109 TRAPS); 110 111 // 112 // Support for reflection based on dynamic bytecode generation (JDK 1.4) 113 // 114 115 // Create a java.lang.reflect.Method object based on a method 116 static oop new_method(const methodHandle& method, bool for_constant_pool_access, TRAPS); 117 // Create a java.lang.reflect.Constructor object based on a method 118 static oop new_constructor(const methodHandle& method, TRAPS); 119 // Create a java.lang.reflect.Field object based on a field descriptor 120 static oop new_field(fieldDescriptor* fd, TRAPS); 121 // Create a java.lang.reflect.Parameter object based on a 122 // MethodParameterElement 123 static oop new_parameter(Handle method, int index, Symbol* sym, 124 int flags, TRAPS); 125 // Method invocation through java.lang.reflect.Method 126 static oop invoke_method(oop method_mirror, 127 Handle receiver, |