diff --git a/doric-android/doric/src/main/java/pub/doric/DoricRegistry.java b/doric-android/doric/src/main/java/pub/doric/DoricRegistry.java index 4430db6a..4677877e 100644 --- a/doric-android/doric/src/main/java/pub/doric/DoricRegistry.java +++ b/doric-android/doric/src/main/java/pub/doric/DoricRegistry.java @@ -248,4 +248,12 @@ public class DoricRegistry { public DoricResourceManager getResourceManager() { return doricResourceManager; } + + public Set allPlugins() { + return pluginInfoMap.keySet(); + } + + public Set allViewNodes() { + return nodeInfoMap.keySet(); + } } diff --git a/doric-iOS/Pod/Classes/DoricRegistry.h b/doric-iOS/Pod/Classes/DoricRegistry.h index 7b856307..fa986578 100644 --- a/doric-iOS/Pod/Classes/DoricRegistry.h +++ b/doric-iOS/Pod/Classes/DoricRegistry.h @@ -56,6 +56,9 @@ NS_ASSUME_NONNULL_BEGIN + (void)register:(DoricLibrary *)library; +-(NSArray *)allPlugins; + +-(NSArray *)allViewNodes; @end NS_ASSUME_NONNULL_END diff --git a/doric-iOS/Pod/Classes/DoricRegistry.m b/doric-iOS/Pod/Classes/DoricRegistry.m index eb8f9842..c4c27245 100644 --- a/doric-iOS/Pod/Classes/DoricRegistry.m +++ b/doric-iOS/Pod/Classes/DoricRegistry.m @@ -198,4 +198,12 @@ - (void)onLog:(DoricLogType)type message:(NSString *)message { [monitor onLog:type message:message]; } } + +- (NSArray *)allPlugins { + return self.plugins.allKeys; +} + +- (NSArray *)allViewNodes { + return self.nodes.allKeys; +} @end