Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8244232: [lworld] Improve javadoc comments for various methods dealing with projection types #148

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -434,7 +434,7 @@ public Symbol valueProjection() {
}

/**
* Return the reference projection IFF 'this' happens to be value projection, null
* Return the reference projection IFF 'this' happens to be inline class, null
* otherwise.
*/
public Symbol referenceProjection() {
@@ -1671,7 +1671,10 @@ public ClassSymbol valueProjection() {

@Override
public ClassSymbol referenceProjection() {
if (!isValue() || projection != null)
if (!isValue())
return null;

if (projection != null)
return projection;

ClassType ct = (ClassType) this.type;
@@ -239,14 +239,26 @@ public boolean isValue() {
return false;
}

/**
* @return true IFF the receiver is a reference projection of an inline type and false
* for primitives or plain references
*/
public boolean isReferenceProjection() {
return false;
}

/**
* @return the value projection type IFF the receiver is a reference projection of an inline type
* and null otherwise
*/
public Type valueProjection() {
return null;
}

/**
* @return the reference projection type IFF the receiver is an inline type
* and null otherwise
*/
public Type referenceProjection() {
return null;
}
@@ -1194,7 +1206,10 @@ public boolean isReferenceProjection() {

@Override
public Type valueProjection() {
if (!isReferenceProjection() || projection != null)
if (!isReferenceProjection())
return null;

if (projection != null)
return projection;

// Make a best case effort to cache the other projection.