File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed
extension/android/executorch_android/src/main/java/org/pytorch/executorch Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+
9
+ package org .pytorch .executorch ;
10
+
11
+ /**
12
+ * Helper class to access the metadata for a method from a Module
13
+ */
14
+ public class MethodMetadata {
15
+ private String name ;
16
+
17
+ public String getName () {
18
+ return name ;
19
+ }
20
+ }
Original file line number Diff line number Diff line change @@ -49,11 +49,19 @@ public class Module {
49
49
50
50
private final HybridData mHybridData ;
51
51
52
+ private final MethodMetadata [] mMethodMetadata ;
53
+
52
54
@ DoNotStrip
53
55
private static native HybridData initHybrid (String moduleAbsolutePath , int loadMode );
54
56
55
57
private Module (String moduleAbsolutePath , int loadMode ) {
56
58
mHybridData = initHybrid (moduleAbsolutePath , loadMode );
59
+
60
+ populateMethodMeta ();
61
+ }
62
+
63
+ void populateMethodMeta () {
64
+ mMethodMetadata = new MethodMetadata [1 ];
57
65
}
58
66
59
67
/** Lock protecting the non-thread safe methods in mHybridData. */
You can’t perform that action at this time.
0 commit comments