In #30392, we found out some impl classes in FFM are marked as value based
class, but they do not have `@ValueBased`.
I grep'ed JDK sources with 'ValueBased.html' which we expect that the word in
Javadoc on value based class, and I tracked it to final implementation class.
`final` classes in following list should have `@ValueBased`.
java.base/share/classes/java/lang/foreign/FunctionDescriptor.java
public sealed interface FunctionDescriptor permits FunctionDescriptorImpl
public final class FunctionDescriptorImpl implements FunctionDescriptor
java.base/share/classes/java/lang/foreign/MemoryLayout.java
public sealed interface MemoryLayout permits SequenceLayout, GroupLayout,
PaddingLayout, ValueLayout
public sealed interface SequenceLayout extends MemoryLayout permits
SequenceLayoutImpl
public final class SequenceLayoutImpl extends
AbstractLayout<SequenceLayoutImpl> implements SequenceLayout
public sealed interface GroupLayout extends MemoryLayout permits
StructLayout, UnionLayout
public sealed interface StructLayout extends GroupLayout permits
StructLayoutImpl
public final class StructLayoutImpl extends
AbstractGroupLayout<StructLayoutImpl> implements StructLayout
public sealed interface UnionLayout extends GroupLayout permits
UnionLayoutImpl
public final class UnionLayoutImpl extends
AbstractGroupLayout<UnionLayoutImpl> implements UnionLayout
public sealed interface PaddingLayout extends MemoryLayout permits
PaddingLayoutImpl
public final class PaddingLayoutImpl extends
AbstractLayout<PaddingLayoutImpl> implements PaddingLayout
public sealed interface ValueLayout extends MemoryLayout permits
ValueLayout.OfBoolean, ValueLayout.OfByte, ValueLayout.OfChar,
ValueLayout.OfShort, ValueLayout.OfInt, ValueLayout.OfFloat,
ValueLayout.OfLong, ValueLayout.OfDouble, AddressLayout
sealed interface OfBoolean extends ValueLayout permits
ValueLayouts.OfBooleanImpl
public static final class OfBooleanImpl extends
AbstractValueLayout<OfBooleanImpl> implements ValueLayout.OfBoolean
sealed interface OfByte extends ValueLayout permits
ValueLayouts.OfByteImpl
public static final class OfByteImpl extends
AbstractValueLayout<OfByteImpl> implements ValueLayout.OfByte
sealed interface OfChar extends ValueLayout permits
ValueLayouts.OfCharImpl
public static final class OfCharImpl extends
AbstractValueLayout<OfCharImpl> implements ValueLayout.OfChar
sealed interface OfShort extends ValueLayout permits
ValueLayouts.OfShortImpl
public static final class OfShortImpl extends
AbstractValueLayout<OfShortImpl> implements ValueLayout.OfShort
sealed interface OfInt extends ValueLayout permits ValueLayouts.OfIntImpl
public static final class OfIntImpl extends
AbstractValueLayout<OfIntImpl> implements ValueLayout.OfInt
sealed interface OfFloat extends ValueLayout permits
ValueLayouts.OfFloatImpl
public static final class OfFloatImpl extends
AbstractValueLayout<OfFloatImpl> implements ValueLayout.OfFloat
sealed interface OfLong extends ValueLayout permits
ValueLayouts.OfLongImpl
public static final class OfLongImpl extends
AbstractValueLayout<OfLongImpl> implements ValueLayout.OfLong
sealed interface OfDouble extends ValueLayout permits
ValueLayouts.OfDoubleImpl
public static final class OfDoubleImpl extends
AbstractValueLayout<OfDoubleImpl> implements ValueLayout.OfDouble
public sealed interface AddressLayout extends ValueLayout permits
ValueLayouts.OfAddressImpl
public static final class OfAddressImpl extends
AbstractValueLayout<OfAddressImpl> implements AddressLayout
java.base/share/classes/java/lang/foreign/MemorySegment.java
public sealed interface MemorySegment permits AbstractMemorySegmentImpl
public abstract sealed class AbstractMemorySegmentImpl implements
MemorySegment, SegmentAllocator permits HeapMemorySegmentImpl,
NativeMemorySegmentImpl
abstract sealed class HeapMemorySegmentImpl extends
AbstractMemorySegmentImpl
public static final class OfByte extends HeapMemorySegmentImpl
public static final class OfChar extends HeapMemorySegmentImpl
public static final class OfShort extends HeapMemorySegmentImpl
public static final class OfInt extends HeapMemorySegmentImpl
public static final class OfLong extends HeapMemorySegmentImpl
public static final class OfFloat extends HeapMemorySegmentImpl
public static final class OfDouble extends HeapMemorySegmentImpl
public sealed class NativeMemorySegmentImpl extends
AbstractMemorySegmentImpl permits MappedMemorySegmentImpl
public final class MappedMemorySegmentImpl extends
NativeMemorySegmentImpl
java.base/share/classes/java/lang/foreign/Linker.java
public sealed interface Linker permits AbstractLinker
public abstract sealed class AbstractLinker implements Linker permits
LinuxAArch64Linker, MacOsAArch64Linker, SysVx64Linker, WindowsAArch64Linker,
Windowsx64Linker, AixPPC64Linker, LinuxPPC64Linker, LinuxPPC64leLinker,
LinuxRISCV64Linker, LinuxS390Linker, FallbackLinker
public final class LinuxAArch64Linker extends AbstractLinker
public final class MacOsAArch64Linker extends AbstractLinker
public final class SysVx64Linker extends AbstractLinker
public final class WindowsAArch64Linker extends AbstractLinker
public final class Windowsx64Linker extends AbstractLinker
public final class AixPPC64Linker extends AbstractLinker
public final class LinuxPPC64Linker extends AbstractLinker
public final class LinuxPPC64leLinker extends AbstractLinker
public final class LinuxRISCV64Linker extends AbstractLinker
public final class LinuxS390Linker extends AbstractLinker
public final class FallbackLinker extends AbstractLinker
java.base/share/classes/jdk/internal/foreign/layout/ValueLayouts.java
public final class ValueLayouts
-------------
Commit messages:
- 8380955: Value-based classes in FFM should have @ValueBased
Changes: https://git.openjdk.org/jdk/pull/30443/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30443&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8380955
Stats: 76 lines in 19 files changed: 57 ins; 0 del; 19 mod
Patch: https://git.openjdk.org/jdk/pull/30443.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/30443/head:pull/30443
PR: https://git.openjdk.org/jdk/pull/30443