174 * transform} is not overridden. 175 * 176 * @implSpec The default implementation returns null. 177 * 178 * @param loader the defining loader of the class to be transformed, 179 * may be {@code null} if the bootstrap loader 180 * @param className the name of the class in the internal form of fully 181 * qualified class and interface names as defined in 182 * <i>The Java Virtual Machine Specification</i>. 183 * For example, <code>"java/util/List"</code>. 184 * @param classBeingRedefined if this is triggered by a redefine or retransform, 185 * the class being redefined or retransformed; 186 * if this is a class load, {@code null} 187 * @param protectionDomain the protection domain of the class being defined or redefined 188 * @param classfileBuffer the input byte buffer in class file format - must not be modified 189 * 190 * @throws IllegalClassFormatException 191 * if the input does not represent a well-formed class file 192 * @return a well-formed class file buffer (the result of the transform), 193 * or {@code null} if no transform is performed 194 */ 195 default byte[] 196 transform( ClassLoader loader, 197 String className, 198 Class<?> classBeingRedefined, 199 ProtectionDomain protectionDomain, 200 byte[] classfileBuffer) 201 throws IllegalClassFormatException { 202 return null; 203 } 204 205 206 /** 207 * Transforms the given class file and returns a new replacement class file. 208 * 209 * @implSpec The default implementation of this method invokes the 210 * {@link #transform(ClassLoader,String,Class,ProtectionDomain,byte[]) transform} 211 * method. 212 * 213 * @param module the module of the class to be transformed | 174 * transform} is not overridden. 175 * 176 * @implSpec The default implementation returns null. 177 * 178 * @param loader the defining loader of the class to be transformed, 179 * may be {@code null} if the bootstrap loader 180 * @param className the name of the class in the internal form of fully 181 * qualified class and interface names as defined in 182 * <i>The Java Virtual Machine Specification</i>. 183 * For example, <code>"java/util/List"</code>. 184 * @param classBeingRedefined if this is triggered by a redefine or retransform, 185 * the class being redefined or retransformed; 186 * if this is a class load, {@code null} 187 * @param protectionDomain the protection domain of the class being defined or redefined 188 * @param classfileBuffer the input byte buffer in class file format - must not be modified 189 * 190 * @throws IllegalClassFormatException 191 * if the input does not represent a well-formed class file 192 * @return a well-formed class file buffer (the result of the transform), 193 * or {@code null} if no transform is performed 194 * 195 * @revised 9 196 * @spec JPMS 197 */ 198 default byte[] 199 transform( ClassLoader loader, 200 String className, 201 Class<?> classBeingRedefined, 202 ProtectionDomain protectionDomain, 203 byte[] classfileBuffer) 204 throws IllegalClassFormatException { 205 return null; 206 } 207 208 209 /** 210 * Transforms the given class file and returns a new replacement class file. 211 * 212 * @implSpec The default implementation of this method invokes the 213 * {@link #transform(ClassLoader,String,Class,ProtectionDomain,byte[]) transform} 214 * method. 215 * 216 * @param module the module of the class to be transformed |