Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stubgenj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
scripting-tools
stubgenj
Commits
e505fd08
Commit
e505fd08
authored
3 years ago
by
Michi Hostettler
Browse files
Options
Downloads
Patches
Plain Diff
add javadoc generation - contributed by Christopher Chianelli
parent
1c952773
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!5
add javadoc generation - contributed by Christopher Chianelli
Pipeline
#3177241
passed
3 years ago
Stage: build
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
stubgenj/_stubgenj.py
+7
-0
7 additions, 0 deletions
stubgenj/_stubgenj.py
with
7 additions
and
0 deletions
stubgenj/_stubgenj.py
+
7
−
0
View file @
e505fd08
...
...
@@ -35,6 +35,7 @@ from typing import List, Optional, Any, Set, Type, Union, Generator
import
jpype
from
jpype._pykeywords
import
pysafe
# noqa : jpype does not expose a public API for the Java name mangling it applies
from
jpype._jclass
import
_jclassDoc
as
generate_class_javadoc
# noqa : jpype does not expose a public API to getting Javadoc
import
logging
...
...
@@ -1005,10 +1006,16 @@ def generateJavaClassStub(package: jpype.JPackage,
output
.
append
(
''
)
output
+=
typeVarOutput
javadocOutput
=
[
'
'
+
javadocLine
for
javadocLine
in
generate_class_javadoc
(
jClass
).
split
(
'
\n
'
)]
if
javadocOutput
:
javadocOutput
=
[
'
"""'
]
+
javadocOutput
+
[
'
"""'
]
if
not
constructorsOutput
and
not
methodsOutput
and
not
fieldsOutput
and
not
nestedClassesOutput
:
output
.
append
(
f
'
class
{
className
}{
superTypeStr
}
: ...
'
)
# a docstring is not allowed here ...
else
:
output
.
append
(
f
'
class
{
className
}{
superTypeStr
}
:
'
)
output
.
extend
(
javadocOutput
)
for
line
in
fieldsOutput
:
output
.
append
(
f
'
{
line
}
'
)
for
line
in
constructorsOutput
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment