Skip to content

Commit

Permalink
Complete support for record component API.
Browse files Browse the repository at this point in the history
  • Loading branch information
raphw committed Apr 21, 2020
1 parent ca2c4e7 commit 5caa2a8
Show file tree
Hide file tree
Showing 6 changed files with 343 additions and 75 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8360,7 +8360,7 @@ public TypeList getNestMembers() {
/**
* {@inheritDoc}
*/
public RecordComponentList getRecordComponents() {
public RecordComponentList<RecordComponentDescription.InDefinedShape> getRecordComponents() {
return delegate().getRecordComponents();
}

Expand Down Expand Up @@ -8787,10 +8787,10 @@ public boolean isNestMateOf(TypeDescription typeDescription) {
/**
* {@inheritDoc}
*/
public RecordComponentList getRecordComponents() {
public RecordComponentList<RecordComponentDescription.InDefinedShape> getRecordComponents() {
Object[] recordComponent = RecordComponentDescription.ForLoadedRecordComponent.DISPATCHER.getRecordComponents(type);
return recordComponent == null
? new RecordComponentList.Empty()
? new RecordComponentList.Empty<RecordComponentDescription.InDefinedShape>()
: new RecordComponentList.ForLoadedRecordComponents();
}

Expand Down Expand Up @@ -9236,8 +9236,8 @@ public TypeList getNestMembers() {
/**
* {@inheritDoc}
*/
public RecordComponentList getRecordComponents() {
return new RecordComponentList.Empty();
public RecordComponentList<RecordComponentDescription.InDefinedShape> getRecordComponents() {
return new RecordComponentList.Empty<RecordComponentDescription.InDefinedShape>();
}

/**
Expand Down Expand Up @@ -9432,7 +9432,7 @@ public TypeList getNestMembers() {
/**
* {@inheritDoc}
*/
public RecordComponentList getRecordComponents() {
public RecordComponentList<RecordComponentDescription.InDefinedShape> getRecordComponents() {
throw new IllegalStateException("Cannot resolve record components of a latent type description: " + this);
}

Expand Down Expand Up @@ -9585,8 +9585,8 @@ public TypeList getNestMembers() {
/**
* {@inheritDoc}
*/
public RecordComponentList getRecordComponents() {
return new RecordComponentList.Empty();
public RecordComponentList<RecordComponentDescription.InDefinedShape> getRecordComponents() {
return new RecordComponentList.Empty<RecordComponentDescription.InDefinedShape>();
}

/**
Expand Down Expand Up @@ -9814,7 +9814,7 @@ public TypeList getNestMembers() {
/**
* {@inheritDoc}
*/
public RecordComponentList getRecordComponents() {
public RecordComponentList<RecordComponentDescription.InDefinedShape> getRecordComponents() {
return delegate.getRecordComponents();
}

Expand Down
Loading

0 comments on commit 5caa2a8

Please sign in to comment.