|
168 | 168 | * <p> |
169 | 169 | * For nonstandard attributes, user-provided attribute mappers can be specified |
170 | 170 | * through the use of the {@link |
171 | | - * ClassFile.AttributeMapperOption#of(Function)}} |
| 171 | + * ClassFile.AttributeMapperOption#of(Function)} |
172 | 172 | * classfile option. Implementations of custom attributes should extend {@link |
173 | 173 | * CustomAttribute}. |
174 | 174 | * |
|
185 | 185 | * -- unrecognized or problematic original attributes (default is {@code PASS_ALL_ATTRIBUTES})</li> |
186 | 186 | * <li>{@link ClassFile.ClassHierarchyResolverOption#of(ClassHierarchyResolver)} |
187 | 187 | * -- specify a custom class hierarchy resolver used by stack map generation</li> |
188 | | - * <li>{@link ClassFile.ConstantPoolSharingOption}} |
| 188 | + * <li>{@link ClassFile.ConstantPoolSharingOption} |
189 | 189 | * -- share constant pool when transforming (default is {@code SHARED_POOL})</li> |
190 | | - * <li>{@link ClassFile.DeadCodeOption}} |
| 190 | + * <li>{@link ClassFile.DeadCodeOption} |
191 | 191 | * -- patch out unreachable code (default is {@code PATCH_DEAD_CODE})</li> |
192 | | - * <li>{@link ClassFile.DeadLabelsOption}} |
| 192 | + * <li>{@link ClassFile.DeadLabelsOption} |
193 | 193 | * -- filter unresolved labels (default is {@code FAIL_ON_DEAD_LABELS})</li> |
194 | 194 | * <li>{@link ClassFile.DebugElementsOption} |
195 | 195 | * -- processing of debug information, such as local variable metadata (default is {@code PASS_DEBUG}) </li> |
|
368 | 368 | * <p> |
369 | 369 | * or lift the code transform into the class transform directly: |
370 | 370 | * {@snippet lang=java : |
371 | | - * ClassTransform ct = ClassTransform.transformingMethodBodiess(fooToBar); |
| 371 | + * ClassTransform ct = ClassTransform.transformingMethodBodies(fooToBar); |
372 | 372 | * } |
373 | 373 | * <p> |
374 | 374 | * and then transform the classfile: |
375 | 375 | * {@snippet lang=java : |
376 | 376 | * var cc = ClassFile.of(); |
377 | | - * byte[] newBytes = cc.transform(cc.parse(bytes), ct); |
| 377 | + * byte[] newBytes = cc.transformClass(cc.parse(bytes), ct); |
378 | 378 | * } |
379 | 379 | * <p> |
380 | 380 | * This is much more concise (and less error-prone) than the equivalent |
|
393 | 393 | * |
394 | 394 | * {@snippet lang=java : |
395 | 395 | * var cc = ClassFile.of(); |
396 | | - * byte[] newBytes = cc.transform(cc.parse(bytes), |
| 396 | + * byte[] newBytes = cc.transformClass(cc.parse(bytes), |
397 | 397 | * ClassTransform.transformingMethods( |
398 | 398 | * MethodTransform.transformingCode( |
399 | 399 | * fooToBar.andThen(instrumentCalls)))); |
|
0 commit comments