Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

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

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 25 additions & 25 deletions src/java.base/share/classes/java/lang/foreign/MemoryAddress.java
Expand Up @@ -167,7 +167,7 @@ static MemoryAddress ofLong(long value) {
}

/**
* 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
Expand All @@ -188,7 +188,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -209,7 +209,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -230,7 +230,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -251,7 +251,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -272,7 +272,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -293,7 +293,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -314,7 +314,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -335,7 +335,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -356,7 +356,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -377,7 +377,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -398,7 +398,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -419,7 +419,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -440,7 +440,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -461,7 +461,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -482,7 +482,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -503,7 +503,7 @@ static MemoryAddress ofLong(long value) {
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
Expand All @@ -524,7 +524,7 @@ static MemoryAddress ofLong(long value) {
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
Expand Down Expand Up @@ -567,7 +567,7 @@ static MemoryAddress ofLong(long value) {
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
Expand Down Expand Up @@ -611,7 +611,7 @@ static MemoryAddress ofLong(long value) {
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
Expand Down Expand Up @@ -655,7 +655,7 @@ static MemoryAddress ofLong(long value) {
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
Expand Down Expand Up @@ -699,7 +699,7 @@ static MemoryAddress ofLong(long value) {
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
Expand Down Expand Up @@ -743,7 +743,7 @@ static MemoryAddress ofLong(long value) {
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
Expand Down Expand Up @@ -787,7 +787,7 @@ static MemoryAddress ofLong(long value) {
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
Expand Down Expand Up @@ -831,7 +831,7 @@ static MemoryAddress ofLong(long value) {
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
Expand Down