8290071: Javadoc for MemorySegment/MemoryAddress getter/setters contains some typos

Reviewed-by: uschindler, psandoz
This commit is contained in:
Maurizio Cimadamore 2022-07-12 14:16:22 +00:00
parent 2baf526fce
commit 0fd1b68972
2 changed files with 50 additions and 50 deletions
src/java.base/share/classes/java/lang/foreign

@ -167,7 +167,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
}
/**
* Reads a byte at the given offset from this address, with the given layout.
* Reads a byte from this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -188,7 +188,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
byte get(ValueLayout.OfByte layout, long offset);
/**
* Writes a byte at the given offset from this address, with the given layout.
* Writes a byte into this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -209,7 +209,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
void set(ValueLayout.OfByte layout, long offset, byte value);
/**
* Reads a boolean at the given offset from this address, with the given layout.
* Reads a boolean from this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -230,7 +230,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
boolean get(ValueLayout.OfBoolean layout, long offset);
/**
* Writes a boolean at the given offset from this address, with the given layout.
* Writes a boolean into this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -251,7 +251,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
void set(ValueLayout.OfBoolean layout, long offset, boolean value);
/**
* Reads a char at the given offset from this address, with the given layout.
* Reads a char from this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -272,7 +272,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
char get(ValueLayout.OfChar layout, long offset);
/**
* Writes a char at the given offset from this address, with the given layout.
* Writes a char into this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -293,7 +293,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
void set(ValueLayout.OfChar layout, long offset, char value);
/**
* Reads a short at the given offset from this address, with the given layout.
* Reads a short from this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -314,7 +314,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
short get(ValueLayout.OfShort layout, long offset);
/**
* Writes a short at the given offset from this address, with the given layout.
* Writes a short into this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -335,7 +335,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
void set(ValueLayout.OfShort layout, long offset, short value);
/**
* Reads an int at the given offset from this address, with the given layout.
* Reads an int from this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -356,7 +356,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
int get(ValueLayout.OfInt layout, long offset);
/**
* Writes an int at the given offset from this address, with the given layout.
* Writes an int into this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -377,7 +377,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
void set(ValueLayout.OfInt layout, long offset, int value);
/**
* Reads a float at the given offset from this address, with the given layout.
* Reads a float from this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -398,7 +398,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
float get(ValueLayout.OfFloat layout, long offset);
/**
* Writes a float at the given offset from this address, with the given layout.
* Writes a float into this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -419,7 +419,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
void set(ValueLayout.OfFloat layout, long offset, float value);
/**
* Reads a long at the given offset from this address, with the given layout.
* Reads a long from this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -440,7 +440,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
long get(ValueLayout.OfLong layout, long offset);
/**
* Writes a long at the given offset from this address, with the given layout.
* Writes a long into this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -461,7 +461,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
void set(ValueLayout.OfLong layout, long offset, long value);
/**
* Reads a double at the given offset from this address, with the given layout.
* Reads a double from this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -482,7 +482,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
double get(ValueLayout.OfDouble layout, long offset);
/**
* Writes a double at the given offset from this address, with the given layout.
* Writes a double into this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -503,7 +503,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
void set(ValueLayout.OfDouble layout, long offset, double value);
/**
* Reads an address at the given offset from this address, with the given layout.
* Reads an address from this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -524,7 +524,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
MemoryAddress get(ValueLayout.OfAddress layout, long offset);
/**
* Writes an address at the given offset from this address, with the given layout.
* Writes an address into this address at the given offset, with the given layout.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -567,7 +567,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
char getAtIndex(ValueLayout.OfChar layout, long index);
/**
* Writes a char to this address at the given index, scaled by the given layout size.
* Writes a char into this address at the given index, scaled by the given layout size.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -611,7 +611,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
short getAtIndex(ValueLayout.OfShort layout, long index);
/**
* Writes a short to this address at the given index, scaled by the given layout size.
* Writes a short into this address at the given index, scaled by the given layout size.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -655,7 +655,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
int getAtIndex(ValueLayout.OfInt layout, long index);
/**
* Writes an int to this address at the given index, scaled by the given layout size.
* Writes an int into this address at the given index, scaled by the given layout size.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -699,7 +699,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
float getAtIndex(ValueLayout.OfFloat layout, long index);
/**
* Writes a float to this address at the given index, scaled by the given layout size.
* Writes a float into this address at the given index, scaled by the given layout size.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -743,7 +743,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
long getAtIndex(ValueLayout.OfLong layout, long index);
/**
* Writes a long to this address at the given index, scaled by the given layout size.
* Writes a long into this address at the given index, scaled by the given layout size.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -787,7 +787,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
double getAtIndex(ValueLayout.OfDouble layout, long index);
/**
* Writes a double to this address at the given index, scaled by the given layout size.
* Writes a double into this address at the given index, scaled by the given layout size.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash
@ -831,7 +831,7 @@ public sealed interface MemoryAddress extends Addressable permits MemoryAddressI
MemoryAddress getAtIndex(ValueLayout.OfAddress layout, long index);
/**
* Writes an address to this address at the given index, scaled by the given layout size.
* Writes an address into this address at the given index, scaled by the given layout size.
* <p>
* This method is <a href="package-summary.html#restricted"><em>restricted</em></a>.
* Restricted methods are unsafe, and, if used incorrectly, their use might crash

@ -1083,7 +1083,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Reads a byte at the given offset from this segment, with the given layout.
* Reads a byte from this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be read.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1104,7 +1104,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a byte at the given offset from this segment, with the given layout.
* Writes a byte into this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be written.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1126,7 +1126,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Reads a boolean at the given offset from this segment, with the given layout.
* Reads a boolean from this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be read.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1147,7 +1147,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a boolean at the given offset from this segment, with the given layout.
* Writes a boolean into this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be written.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1169,7 +1169,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Reads a char at the given offset from this segment, with the given layout.
* Reads a char from this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be read.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1190,7 +1190,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a char at the given offset from this segment, with the given layout.
* Writes a char into this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be written.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1212,7 +1212,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Reads a short at the given offset from this segment, with the given layout.
* Reads a short from this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be read.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1233,7 +1233,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a short at the given offset from this segment, with the given layout.
* Writes a short into this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be written.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1255,7 +1255,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Reads an int at the given offset from this segment, with the given layout.
* Reads an int from this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be read.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1276,7 +1276,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes an int at the given offset from this segment, with the given layout.
* Writes an int into this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be written.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1298,7 +1298,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Reads a float at the given offset from this segment, with the given layout.
* Reads a float from this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be read.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1319,7 +1319,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a float at the given offset from this segment, with the given layout.
* Writes a float into this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be written.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1341,7 +1341,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Reads a long at the given offset from this segment, with the given layout.
* Reads a long from this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be read.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1362,7 +1362,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a long at the given offset from this segment, with the given layout.
* Writes a long into this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be written.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1384,7 +1384,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Reads a double at the given offset from this segment, with the given layout.
* Reads a double from this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be read.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1405,7 +1405,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a double at the given offset from this segment, with the given layout.
* Writes a double into this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be written.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1427,7 +1427,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Reads an address at the given offset from this segment, with the given layout.
* Reads an address from this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be read.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1448,7 +1448,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes an address at the given offset from this segment, with the given layout.
* Writes an address into this segment at the given offset, with the given layout.
*
* @param layout the layout of the memory region to be written.
* @param offset offset in bytes (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1494,7 +1494,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a char to this segment at the given index, scaled by the given layout size.
* Writes a char into this segment at the given index, scaled by the given layout size.
*
* @param layout the layout of the memory region to be written.
* @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1543,7 +1543,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a short to this segment at the given index, scaled by the given layout size.
* Writes a short into this segment at the given index, scaled by the given layout size.
*
* @param layout the layout of the memory region to be written.
* @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1592,7 +1592,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes an int to this segment at the given index, scaled by the given layout size.
* Writes an int into this segment at the given index, scaled by the given layout size.
*
* @param layout the layout of the memory region to be written.
* @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1641,7 +1641,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a float to this segment at the given index, scaled by the given layout size.
* Writes a float into this segment at the given index, scaled by the given layout size.
*
* @param layout the layout of the memory region to be written.
* @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1690,7 +1690,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a long to this segment at the given index, scaled by the given layout size.
* Writes a long into this segment at the given index, scaled by the given layout size.
*
* @param layout the layout of the memory region to be written.
* @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1739,7 +1739,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes a double to this segment at the given index, scaled by the given layout size.
* Writes a double into this segment at the given index, scaled by the given layout size.
*
* @param layout the layout of the memory region to be written.
* @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,
@ -1788,7 +1788,7 @@ public sealed interface MemorySegment extends Addressable permits AbstractMemory
}
/**
* Writes an address to this segment at the given index, scaled by the given layout size.
* Writes an address into this segment at the given index, scaled by the given layout size.
*
* @param layout the layout of the memory region to be written.
* @param index index (relative to this segment). For instance, if this segment is a {@linkplain #isNative() native} segment,