8335939: Hide element writing across the ClassFile API

Reviewed-by: asotona
This commit is contained in:
Chen Liang 2024-07-23 12:11:47 +00:00
parent e83b4b236e
commit a2a236f904
50 changed files with 263 additions and 360 deletions

View file

@ -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
@ -24,9 +24,6 @@
*/
package java.lang.classfile.instruction;
import java.lang.constant.ClassDesc;
import java.lang.classfile.BufWriter;
import java.lang.classfile.ClassFile;
import java.lang.classfile.CodeElement;
import java.lang.classfile.CodeModel;
@ -34,6 +31,8 @@ import java.lang.classfile.Label;
import java.lang.classfile.PseudoInstruction;
import java.lang.classfile.attribute.LocalVariableTableAttribute;
import java.lang.classfile.constantpool.Utf8Entry;
import java.lang.constant.ClassDesc;
import jdk.internal.classfile.impl.AbstractPseudoInstruction;
import jdk.internal.classfile.impl.BoundLocalVariable;
import jdk.internal.classfile.impl.TemporaryConstantPool;
@ -84,14 +83,6 @@ public sealed interface LocalVariable extends PseudoInstruction
*/
Label endScope();
/**
* Writes the local variable to the specified writer
*
* @param buf the writer
* @return true if the variable has been written
*/
boolean writeTo(BufWriter buf);
/**
* {@return a local variable pseudo-instruction}
*