Welcome to javapoet Discussions! #865
Replies: 5 comments 9 replies
-
Hi there, Is there a way to append a comment to a item declaration: I am using JavaDoc comments currently and they take up 3 lines: |
Beta Was this translation helpful? Give feedback.
-
FieldSpec.addInitializer("; // BUFFER OVERRUN INDICT") is a hack that would
work - it would append a semicolon at the end of the comment if you're ok
with that.
But generated code shouldn't really care about extra lines, so none of this
is likely worth it.
…On Thu, Feb 24, 2022 at 10:15 PM yaccoff ***@***.***> wrote:
Ah just reiwing the other post, about off loading.
—
Reply to this email directly, view it on GitHub
<#865 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGBRXMJXIYDVQBJ3HXOS6DU42GXJANCNFSM5N4BACNA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Replace addJavadoc and use addInitializer("; $L", strJavadoc)
…On Thu, Feb 24, 2022 at 10:44 PM yaccoff ***@***.***> wrote:
Can I just understand your reply: Given this code,
FieldSpec fs = FieldSpec.builder(listParameterizedTypeName, name)
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
.addJavadoc(strJavadoc)
.build();
it would change to this?
FieldSpec fs = FieldSpec.builder(listParameterizedTypeName, name)
.addModifiers(Modifier.PUBLIC, Modifier.FINAL)
.addInitializer("; // BUFFER OVERRUN INDICT")
.addJavadoc(strJavadoc)
.build();
—
Reply to this email directly, view it on GitHub
<#865 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGBRXNXG7KMEZA6MHDZO6LU42KBDANCNFSM5N4BACNA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Having implemented the suggestion; by adding: initialise("ArrayList<Integer>(); // $L", strJavaDoc) ......the ArrayList isnt imported into the class definition, Any way to do that? |
Beta Was this translation helpful? Give feedback.
-
I think you'd do well to read the docs
בתאריך יום ו׳, 25 בפבר׳ 2022, 12:07, מאת yaccoff ***@***.***
…:
Having implemented the suggestion; by adding:
initialise("ArrayList(); // $L", strJavaDoc) ......the ArrayList isnt
imported into the class definition, Any way to do that?
—
Reply to this email directly, view it on GitHub
<#865 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGBRXJWBXWDHIT5CXPKGKLU45IHVANCNFSM5N4BACNA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
👋 Welcome!
We’re using Discussions as a place to connect with other members of our community. We hope that you:
build together 💪.
To get started, comment below with an introduction of yourself and tell us about what you do with this community.
Beta Was this translation helpful? Give feedback.
All reactions