212 *
213 * @param module the module of the class to be transformed
214 * @param loader the defining loader of the class to be transformed,
215 * may be {@code null} if the bootstrap loader
216 * @param className the name of the class in the internal form of fully
217 * qualified class and interface names as defined in
218 * <i>The Java Virtual Machine Specification</i>.
219 * For example, <code>"java/util/List"</code>.
220 * @param classBeingRedefined if this is triggered by a redefine or retransform,
221 * the class being redefined or retransformed;
222 * if this is a class load, {@code null}
223 * @param protectionDomain the protection domain of the class being defined or redefined
224 * @param classfileBuffer the input byte buffer in class file format - must not be modified
225 *
226 * @throws IllegalClassFormatException
227 * if the input does not represent a well-formed class file
228 * @return a well-formed class file buffer (the result of the transform),
229 * or {@code null} if no transform is performed
230 *
231 * @since 9
232 */
233 default byte[]
234 transform( Module module,
235 ClassLoader loader,
236 String className,
237 Class<?> classBeingRedefined,
238 ProtectionDomain protectionDomain,
239 byte[] classfileBuffer)
240 throws IllegalClassFormatException {
241
242 // invoke the legacy transform method
243 return transform(loader,
244 className,
245 classBeingRedefined,
246 protectionDomain,
247 classfileBuffer);
248 }
249 }
|
212 *
213 * @param module the module of the class to be transformed
214 * @param loader the defining loader of the class to be transformed,
215 * may be {@code null} if the bootstrap loader
216 * @param className the name of the class in the internal form of fully
217 * qualified class and interface names as defined in
218 * <i>The Java Virtual Machine Specification</i>.
219 * For example, <code>"java/util/List"</code>.
220 * @param classBeingRedefined if this is triggered by a redefine or retransform,
221 * the class being redefined or retransformed;
222 * if this is a class load, {@code null}
223 * @param protectionDomain the protection domain of the class being defined or redefined
224 * @param classfileBuffer the input byte buffer in class file format - must not be modified
225 *
226 * @throws IllegalClassFormatException
227 * if the input does not represent a well-formed class file
228 * @return a well-formed class file buffer (the result of the transform),
229 * or {@code null} if no transform is performed
230 *
231 * @since 9
232 * @spec JPMS
233 */
234 default byte[]
235 transform( Module module,
236 ClassLoader loader,
237 String className,
238 Class<?> classBeingRedefined,
239 ProtectionDomain protectionDomain,
240 byte[] classfileBuffer)
241 throws IllegalClassFormatException {
242
243 // invoke the legacy transform method
244 return transform(loader,
245 className,
246 classBeingRedefined,
247 protectionDomain,
248 classfileBuffer);
249 }
250 }
|