mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8333749: Consolidate ConstantDesc conversion in java.base
Co-authored-by: Claes Redestad <redestad@openjdk.org> Reviewed-by: redestad, jvernee
This commit is contained in:
parent
a6fc2f839a
commit
8d2f9e57c3
13 changed files with 208 additions and 142 deletions
|
@ -45,6 +45,7 @@ import java.lang.classfile.attribute.LocalVariableTypeInfo;
|
|||
import java.lang.classfile.instruction.ExceptionCatch;
|
||||
import java.util.List;
|
||||
import static java.util.Objects.requireNonNull;
|
||||
import static jdk.internal.constant.ConstantUtils.CD_module_info;
|
||||
import jdk.internal.javac.PreviewFeature;
|
||||
|
||||
/**
|
||||
|
@ -392,7 +393,7 @@ public sealed interface ClassFile
|
|||
*/
|
||||
default byte[] buildModule(ModuleAttribute moduleAttribute,
|
||||
Consumer<? super ClassBuilder> handler) {
|
||||
return build(ClassDesc.of("module-info"), clb -> {
|
||||
return build(CD_module_info, clb -> {
|
||||
clb.withFlags(AccessFlag.MODULE);
|
||||
clb.with(moduleAttribute);
|
||||
handler.accept(clb);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue