File tree 1 file changed +12
-2
lines changed
src/main/java/org/scijava/plugin
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() {
99
99
100
100
private void createInstances () {
101
101
instances =
102
- Collections .unmodifiableList (getPluginService (). createInstancesOfType (
103
- getPluginType ()));
102
+ Collections .unmodifiableList (filterInstances ( getPluginService ()
103
+ . createInstancesOfType ( getPluginType () )));
104
104
105
105
log .info ("Found " + instances .size () + " " +
106
106
getPluginType ().getSimpleName () + " plugins." );
@@ -111,4 +111,14 @@ private void createInstances() {
111
111
}
112
112
}
113
113
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
+
114
124
}
You can’t perform that action at this time.
0 commit comments