File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed
src/main/java/org/scijava/plugin Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -99,8 +99,8 @@ public ArrayList<Object> get() {
9999
100100 private void createInstances () {
101101 instances =
102- Collections .unmodifiableList (getPluginService (). createInstancesOfType (
103- getPluginType ()));
102+ Collections .unmodifiableList (filterInstances ( getPluginService ()
103+ . createInstancesOfType ( getPluginType () )));
104104
105105 log .info ("Found " + instances .size () + " " +
106106 getPluginType ().getSimpleName () + " plugins." );
@@ -111,4 +111,14 @@ private void createInstances() {
111111 }
112112 }
113113
114+ /**
115+ * Allows subclasses to exclude instances.
116+ *
117+ * @param list the initial list of instances
118+ * @return the filtered list of instances
119+ */
120+ protected List <? extends PT > filterInstances (List <PT > list ) {
121+ return list ;
122+ }
123+
114124}
You can’t perform that action at this time.
0 commit comments