OpenJDK / amber / amber
changeset 57850:bcff4c419f13 records-and-sealed
add skeleton for method isVarArgs to RecordComponent
author | vromero |
---|---|
date | Wed, 25 Sep 2019 16:44:45 -0400 |
parents | 46695a6ef917 |
children | 9104a203a6a2 13e4764812ad 8bd13ad8dfe4 |
files | src/java.base/share/classes/java/lang/reflect/RecordComponent.java |
diffstat | 1 files changed, 15 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/reflect/RecordComponent.java Wed Sep 25 16:22:55 2019 -0400 +++ b/src/java.base/share/classes/java/lang/reflect/RecordComponent.java Wed Sep 25 16:44:45 2019 -0400 @@ -111,4 +111,19 @@ public Annotation[] getDeclaredAnnotations() { return new Annotation[0]; } + + /** + * Returns {@code true} if this record component was declared with + * variable arity; returns {@code false} otherwise. + * + * @return {@code true} if an only if this record component was declared + * with a variable arity. + */ + public boolean isVarArgs() { + /* + once we have the new Class::getRecordComponents, we can use it to retrieve the canonical constructor, if it is + varargs and this record component is the last in the record components array, then voila + */ + return false; + } }