Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
572c18da
Commit
572c18da
authored
Oct 15, 2013
by
Roman Donchenko
Committed by
OpenCV Buildbot
Oct 15, 2013
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1627 from SpecLad:java-version-no-inline
parents
7fb18a23
7ff91665
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
2 deletions
+14
-2
gen_java.py
modules/java/generator/gen_java.py
+14
-2
No files found.
modules/java/generator/gen_java.py
View file @
572c18da
...
...
@@ -785,8 +785,20 @@ public class %(jc)s {
version_suffix
=
''
.
join
(
(
epoch
,
major
,
minor
)
)
self
.
classes
[
class_name
]
.
imports
.
add
(
"java.lang.String"
)
self
.
java_code
[
class_name
][
"j_code"
]
.
write
(
"""
public static final String VERSION = "
%(v)
s", NATIVE_LIBRARY_NAME = "opencv_java
%(vs)
s";
public static final int VERSION_EPOCH =
%(ep)
s, VERSION_MAJOR =
%(ma)
s, VERSION_MINOR =
%(mi)
s, VERSION_REVISION =
%(re)
s;
// these constants are wrapped inside functions to prevent inlining
private static String getVersion() { return "
%(v)
s"; }
private static String getNativeLibraryName() { return "opencv_java
%(vs)
s"; }
private static int getVersionEpoch() { return
%(ep)
s; }
private static int getVersionMajor() { return
%(ma)
s; }
private static int getVersionMinor() { return
%(mi)
s; }
private static int getVersionRevision() { return
%(re)
s; }
public static final String VERSION = getVersion();
public static final String NATIVE_LIBRARY_NAME = getNativeLibraryName();
public static final int VERSION_EPOCH = getVersionEpoch();
public static final int VERSION_MAJOR = getVersionMajor();
public static final int VERSION_MINOR = getVersionMinor();
public static final int VERSION_REVISION = getVersionRevision();
"""
%
{
'v'
:
version_str
,
'vs'
:
version_suffix
,
'ep'
:
epoch
,
'ma'
:
major
,
'mi'
:
minor
,
're'
:
revision
}
)
...
...
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