Skip to content

Commit

Permalink
Fixed return value documentation comments for getter of property elem…
Browse files Browse the repository at this point in the history
…ent (heremaps#1541)

Fixed return value documentation comments for getter of property element
---------
Signed-off-by: Sameer Mahant <[email protected]>
  • Loading branch information
sameermahant authored Jul 31, 2023
1 parent 1ba42f2 commit f4b1e8d
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,26 @@
{{#ifPredicate "hasAnyComment"}}
/**
{{prefixPartial "combinedComment" " * "}}
*/{{#if attributes.deprecated}}
@Deprecated{{/if}}{{/ifPredicate}}{{!!
*/
{{#if attributes.deprecated}}@Deprecated{{/if}}
{{/ifPredicate}}

}}{{+combinedComment}}{{resolveName comment}}{{#if comment.isExcluded}}
@hidden{{/if}}{{#if attributes.deprecated}}
@deprecated {{resolveName attributes.deprecated.message}}{{/if}}{{!!
{{+combinedComment}}{{!!
}}{{resolveName comment}}{{!!
}}{{#if comment.isExcluded}}
{{!!}}@hidden{{!!
}}{{/if}}{{!!
}}{{#if attributes.deprecated}}
{{!!}}@deprecated {{resolveName attributes.deprecated.message}}{{!!
}}{{/if}}{{!!
}}{{#parameters}}
@param {{resolveName}} {{#resolveName comment}}{{prefix this " " skipFirstLine=true}}{{/resolveName}}{{/parameters}}{{!!
}}{{#unless isConstructor returnType.isVoid isGetter logic="and"}}{{!! document the return value if
it's neither a constructor nor returning void nor a getter}}
@return {{#resolveName returnType.comment}}{{prefix this " " skipFirstLine=true}}{{/resolveName}}{{/unless}}{{!!
{{!!}}@param {{resolveName}} {{#resolveName comment}}{{prefix this " " skipFirstLine=true}}{{/resolveName}}{{!!
}}{{/parameters}}{{!!
}}{{!! document the return value if it's neither a constructor nor returning void }}{{!!
}}{{#unless isConstructor returnType.isVoid logic="and"}}
{{!!}}@return {{#resolveName returnType.comment}}{{prefix this " " skipFirstLine=true}}{{/resolveName}}{{!!
}}{{/unless}}{{!!
}}{{#if thrownType}}
@throws {{resolveName exception "" "ref"}} {{#resolveName thrownType.comment}}{{prefix this " " skipFirstLine=true}}{{/resolveName}}{{/if}}{{!!
{{!!}}@throws {{resolveName exception "" "ref"}} {{#resolveName thrownType.comment}}{{prefix this " " skipFirstLine=true}}{{/resolveName}}{{!!
}}{{/if}}{{!!
}}{{/combinedComment}}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public void disposeNative(long handle) {
public native void veryFun();
/**
* <p>Getter comment
* @return <p>Property comment
*/
@OnPropertyInClass
@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public void disposeNative(long handle) {
/**
*
* @deprecated
* @return
*/
@Deprecated
@OnPropertyInClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ public void disposeNative(long handle) {
public native String returnCommentOnly(@NonNull final String undocumented);
/**
* <p>Gets some very useful property.
* @return <p>Some very useful property.
*/
public native boolean isSomeProperty();
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ public SomeStruct(final boolean someField) {
void someMethodWithoutReturnTypeOrInputParameters();
/**
* <p>Gets some very useful property.
* @return <p>Some very useful property.
*/
boolean isSomeProperty();
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public SomeStruct() {
* <p>Gets some very useful property.
* @deprecated <p>Unfortunately, this property's getter is deprecated.
* Use {@link com.example.smoke.Comments#isSomeProperty} instead.
* @return <p>Some very useful property.
*/
@Deprecated
boolean isSomeProperty();
Expand All @@ -88,6 +89,7 @@ public SomeStruct() {
/**
* <p>Gets the property but not accessors.
* @deprecated <p>Will be removed in v3.2.1.
* @return <p>Describes the property but not accessors.
*/
@Deprecated
@NonNull
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public SomeStruct() {
/**
*
* @deprecated <p>Unfortunately, this property's getter is deprecated.
* @return
*/
@Deprecated
boolean isSomeProperty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ public void disposeNative(long handle) {
/**
* <p>Gets some very useful property.
* @hidden
* @return <p>Some very useful property.
*/
public native boolean isSomeProperty();
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ public void disposeNative(long handle) {
/**
*
* @hidden
* @return
*/
public native boolean isSomeProperty();
/**
Expand Down

0 comments on commit f4b1e8d

Please sign in to comment.