arina-ielchiieva commented on a change in pull request #1988: DRILL-7590: 
Refactor plugin registry
URL: https://github.com/apache/drill/pull/1988#discussion_r383962170
 
 

 ##########
 File path: 
logical/src/main/java/org/apache/drill/common/config/LogicalPlanPersistence.java
 ##########
 @@ -68,4 +75,29 @@ public ObjectMapper getMapper() {
       mapper.registerSubtypes(type);
     }
   }
+
+  /**
+   * scan for implementations of the given interface.
+   *
+   * @param classpathScan - Drill configuration object, used to find the 
packages to scan
+   * @return - list of classes that implement the interface.
+   */
+  public static <T> Set<Class<? extends T>> getSubTypes(final ScanResult 
classpathScan, Class<T> parent) {
+    final Set<Class<? extends T>> subclasses = 
classpathScan.getImplementations(parent);
 
 Review comment:
   ```suggestion
       Set<Class<? extends T>> subclasses = 
classpathScan.getImplementations(parent);
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to