Commit a5936246 authored by Eric Stevenson's avatar Eric Stevenson Committed by Commit Bot

jni_generator: Remove annotation order constraints for @NativeMethods.

Previously would fail if another annotation came after @NativeMethods.

Bug: 1018296
Change-Id: Id80385d0a0ad0594134d5e04d87f28f9efd77888
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1885017
Auto-Submit: Eric Stevenson <estevenson@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710334}
parent 0f53ed4f
......@@ -61,7 +61,7 @@ _EXTRACT_METHODS_REGEX = re.compile(
flags=re.DOTALL)
_NATIVE_PROXY_EXTRACTION_REGEX = re.compile(
r'@NativeMethods\s*(public|private)*\s*interface\s*'
r'@NativeMethods[\S\s]+?interface\s*'
r'(?P<interface_name>\w*)\s*(?P<interface_body>{(\s*.*)+?\s*})')
# Use 100 columns rather than 80 because it makes many lines more readable.
......
......@@ -1421,7 +1421,9 @@ class ProxyTestGenerator(BaseTest):
test_data = """
class SampleProxyJni {
private void do_not_match();
@VisibleForTesting
@NativeMethods
@Generated("Test")
interface Natives {
@NativeClassQualifiedName("FooAndroid::BarDelegate")
void foo(long nativePtr);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment