This would more efficiently be accomplished with a switch statement on the parameter. See PluginInfo.java for an example.