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 {
4949
5050 private final HybridData mHybridData ;
5151
52+ private final MethodMetadata [] mMethodMetadata ;
53+
5254 @ DoNotStrip
5355 private static native HybridData initHybrid (String moduleAbsolutePath , int loadMode );
5456
5557 private Module (String moduleAbsolutePath , int loadMode ) {
5658 mHybridData = initHybrid (moduleAbsolutePath , loadMode );
59+
60+ populateMethodMeta ();
61+ }
62+
63+ void populateMethodMeta () {
64+ mMethodMetadata = new MethodMetadata [1 ];
5765 }
5866
5967 /** Lock protecting the non-thread safe methods in mHybridData. */
You can’t perform that action at this time.
0 commit comments