mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8334726: Remove accidentally exposed individual methods from Class-File API
Reviewed-by: asotona
This commit is contained in:
parent
f187c92bef
commit
3a2d426489
7 changed files with 7 additions and 37 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -153,7 +153,7 @@ public sealed interface ModuleAttribute
|
|||
Consumer<ModuleAttributeBuilder> attrHandler) {
|
||||
var mb = new ModuleAttributeBuilderImpl(moduleName);
|
||||
attrHandler.accept(mb);
|
||||
return mb.build();
|
||||
return mb.build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -166,7 +166,7 @@ public sealed interface ModuleAttribute
|
|||
Consumer<ModuleAttributeBuilder> attrHandler) {
|
||||
var mb = new ModuleAttributeBuilderImpl(moduleName);
|
||||
attrHandler.accept(mb);
|
||||
return mb.build();
|
||||
return mb.build();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -319,11 +319,5 @@ public sealed interface ModuleAttribute
|
|||
* @return this builder
|
||||
*/
|
||||
ModuleAttributeBuilder provides(ModuleProvideInfo provides);
|
||||
|
||||
/**
|
||||
* Builds module attribute.
|
||||
* @return the module attribute
|
||||
*/
|
||||
ModuleAttribute build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -74,12 +74,4 @@ public sealed interface CodeRelabeler extends CodeTransform permits CodeRelabele
|
|||
static CodeRelabeler of(BiFunction<Label, CodeBuilder, Label> mapFunction) {
|
||||
return new CodeRelabelerImpl(mapFunction);
|
||||
}
|
||||
|
||||
/**
|
||||
* Access method to internal re-labeling function.
|
||||
* @param label source label
|
||||
* @param codeBuilder builder to create new labels
|
||||
* @return target label
|
||||
*/
|
||||
Label relabel(Label label, CodeBuilder codeBuilder);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -92,14 +92,6 @@ public sealed interface ConstantPoolBuilder
|
|||
*/
|
||||
boolean canWriteDirect(ConstantPool constantPool);
|
||||
|
||||
/**
|
||||
* Writes associated bootstrap method entries to the specified writer
|
||||
*
|
||||
* @param buf the writer
|
||||
* @return false when no bootstrap method entry has been written
|
||||
*/
|
||||
boolean writeBootstrapMethods(BufWriter buf);
|
||||
|
||||
/**
|
||||
* {@return A {@link Utf8Entry} describing the provided {@linkplain String}}
|
||||
* If a UTF8 entry in the pool already describes this string, it is returned;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -42,7 +42,6 @@ import java.util.function.BiFunction;
|
|||
|
||||
public record CodeRelabelerImpl(BiFunction<Label, CodeBuilder, Label> mapFunction) implements CodeRelabeler {
|
||||
|
||||
@Override
|
||||
public Label relabel(Label label, CodeBuilder cob) {
|
||||
return mapFunction.apply(label, cob);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -58,7 +58,6 @@ public final class ModuleAttributeBuilderImpl
|
|||
this(TemporaryConstantPool.INSTANCE.moduleEntry(TemporaryConstantPool.INSTANCE.utf8Entry(moduleName.name())));
|
||||
}
|
||||
|
||||
@Override
|
||||
public ModuleAttribute build() {
|
||||
return new UnboundAttribute.UnboundModuleAttribute(moduleEntry, moduleFlags, moduleVersion,
|
||||
requires, exports, opens, uses, provides);
|
||||
|
|
|
@ -135,7 +135,6 @@ public final class SplitConstantPool implements ConstantPoolBuilder {
|
|||
return this == other || parent == other;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean writeBootstrapMethods(BufWriter buf) {
|
||||
if (bsmSize == 0)
|
||||
return false;
|
||||
|
|
|
@ -190,11 +190,6 @@ public final class TemporaryConstantPool implements ConstantPoolBuilder {
|
|||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean writeBootstrapMethods(BufWriter buf) {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeTo(BufWriter buf) {
|
||||
throw new UnsupportedOperationException();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue