Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
bc99dc10
Commit
bc99dc10
authored
Oct 23, 2019
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upadte
parent
c3188846
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
python/tools/garbel/class_builder.py
+3
-3
No files found.
python/tools/garbel/class_builder.py
View file @
bc99dc10
...
...
@@ -5,7 +5,7 @@ class ClassBuilder:
__used_names
=
[]
__variables
=
[]
__functions
=
[]
__
class_
name
=
""
__name
=
""
def
__gen_rand_str
(
self
):
result
=
""
while
len
(
result
)
==
0
or
result
in
self
.
__used_names
:
...
...
@@ -87,7 +87,7 @@ class ClassBuilder:
for
i
in
range
(
0
,
random
.
randint
(
0
,
5
)):
log_code
+=
"Log.
%
s(
\"
%
s
\"
,
\"
%
s
\"
);
\n
"
%
(
''
.
join
(
random
.
sample
(
"idew"
,
random
.
randint
(
1
,
1
))),
self
.
__
class_
name
,
self
.
__name
,
''
.
join
(
random
.
sample
(
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
,
random
.
randint
(
5
,
15
)))
)
...
...
@@ -116,7 +116,7 @@ class ClassBuilder:
def
new_class
(
self
,
class_name
,
pkg_name
):
self
.
__
class_
name
=
class_name
self
.
__name
=
class_name
self
.
__generate_variable
()
self
.
__generate_function
(
"tools/garbel/model/function_model.java"
)
class_content
=
self
.
__generate_class
(
"tools/garbel/model/activity_model.java"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment