197 * to determine if the redefinition can add methods. 198 * Use {@link #canUnrestrictedlyRedefineClasses() canUnrestrictedlyRedefineClasses()} 199 * to determine if the redefinition can change the schema, 200 * delete methods, change the class hierarchy, etc. 201 * 202 * @param classToBytes A map from {@link ReferenceType} 203 * to array of byte. 204 * The bytes represent the new class definition and 205 * are in Java Virtual Machine class file format. 206 * 207 * @throws java.lang.UnsupportedOperationException if 208 * the target virtual machine does not support this 209 * operation. 210 * <UL> 211 * <LI>If {@link #canRedefineClasses() canRedefineClasses()} 212 * is false any call of this method will throw this exception. 213 * <LI>If {@link #canAddMethod() canAddMethod()} is false 214 * attempting to add a method will throw this exception. 215 * <LI>If {@link #canUnrestrictedlyRedefineClasses() 216 * canUnrestrictedlyRedefineClasses()} 217 * is false, attempting any of the following will throw 218 * this exception 219 * <UL> 220 * <LI>changing the schema (the fields) 221 * <LI>changing the hierarchy (superclasses, interfaces) 222 * <LI>deleting a method 223 * <LI>changing class modifiers 224 * <LI>changing method modifiers 225 * <LI>changing the {@code NestHost}, {@code NestMembers}, or {@code Record} class attributes 226 * </UL> 227 * </UL> 228 * 229 * @throws java.lang.NoClassDefFoundError if the bytes 230 * don't correspond to the reference type (the names 231 * don't match). 232 * 233 * @throws java.lang.VerifyError if a "verifier" detects 234 * that a class, though well formed, contains an internal 235 * inconsistency or security problem. 236 * 237 * @throws java.lang.ClassFormatError if the bytes 238 * do not represent a valid class. 239 * 240 * @throws java.lang.ClassCircularityError if a 241 * circularity has been detected while initializing a class. 242 * 243 * @throws java.lang.UnsupportedClassVersionError if the 244 * major and minor version numbers in bytes 245 * are not supported by the VM. 246 * 247 * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}. | 197 * to determine if the redefinition can add methods. 198 * Use {@link #canUnrestrictedlyRedefineClasses() canUnrestrictedlyRedefineClasses()} 199 * to determine if the redefinition can change the schema, 200 * delete methods, change the class hierarchy, etc. 201 * 202 * @param classToBytes A map from {@link ReferenceType} 203 * to array of byte. 204 * The bytes represent the new class definition and 205 * are in Java Virtual Machine class file format. 206 * 207 * @throws java.lang.UnsupportedOperationException if 208 * the target virtual machine does not support this 209 * operation. 210 * <UL> 211 * <LI>If {@link #canRedefineClasses() canRedefineClasses()} 212 * is false any call of this method will throw this exception. 213 * <LI>If {@link #canAddMethod() canAddMethod()} is false 214 * attempting to add a method will throw this exception. 215 * <LI>If {@link #canUnrestrictedlyRedefineClasses() 216 * canUnrestrictedlyRedefineClasses()} 217 * is false attempting any of the unsupported class file changes described 218 * in <a href="{@docRoot}/../specs/jvmti.html#RedefineClasses"> 219 * JVM TI RedefineClasses</a> will throw this exception. 220 * 221 * @throws java.lang.NoClassDefFoundError if the bytes 222 * don't correspond to the reference type (the names 223 * don't match). 224 * 225 * @throws java.lang.VerifyError if a "verifier" detects 226 * that a class, though well formed, contains an internal 227 * inconsistency or security problem. 228 * 229 * @throws java.lang.ClassFormatError if the bytes 230 * do not represent a valid class. 231 * 232 * @throws java.lang.ClassCircularityError if a 233 * circularity has been detected while initializing a class. 234 * 235 * @throws java.lang.UnsupportedClassVersionError if the 236 * major and minor version numbers in bytes 237 * are not supported by the VM. 238 * 239 * @throws VMCannotBeModifiedException if the VirtualMachine is read-only - see {@link VirtualMachine#canBeModified()}. |