title: Java NoSuchMethodException when getting constructor
body: <p>I am trying to use reflections to load an instance of a class. I am getting a no such method exception when I try and do it. I have checked and checked and re-checked. That constructor clearly does exist. Does anyone have any ideas? I have successfully used this before on another project with essentially identical code so I'm not sure where I screwed up. Source can be found here:</p>
  
  <pre><code>private void loadCommands() {
          try {
              for (Class&lt;?&gt; clazz : ReflectionsReplacement.getSubtypesOf(BaseCommand.class, "us.zsugano.itemsave.commands", plugin.getClass().getClassLoader(), BaseCommand.class)) {
  
                  BaseCommand baseCommand = null;
                  try {
                      baseCommand = (BaseCommand) clazz.getConstructor(ItemSave.class).newInstance(plugin);
  
                      if(Listener.class.isAssignableFrom(clazz)) {
                          plugin.getServer().getPluginManager().registerEvents((Listener) baseCommand, plugin);
                      }
  
                  } catch (Exception e) {
                      plugin.PluginPM.sendMessage(Level.SEVERE, "Issues encountered when trying to load commands.");
                      e.printStackTrace();
                  }
                  commands.add(baseCommand);
              }
          } catch (Exception e) {
              plugin.PluginPM.sendMessage(Level.SEVERE, "Exception caught while loading commands.");
              e.printStackTrace();
          }
  
          for (BaseCommand command : commands) {
              plugin.getCommand(command.getName().toLowerCase()).setExecutor(this);
          }
  
  }
  
  public abstract class BaseCommand {
  
      public ItemSave plugin;
  
      public BaseCommand(ItemSave plugin) {
          this.plugin = plugin;
  }
  </code></pre>
  
  <p>Full Source: <a href="https://github.com/zachoooo/ItemSave" rel="noreferrer">https://github.com/zachoooo/ItemSave</a></p>
  
  <p>And here is the Stack Trace:</p>
  
  <pre><code>19:43:10 [SEVERE] [ItemSave] Issues encountered when trying to load commands.
  19:43:10 [SEVERE] java.lang.NoSuchMethodException: us.zsugano.itemsave.commands.
  StoreCommand.&lt;init&gt;(us.zsugano.itemsave.ItemSave)
  19:43:10 [SEVERE]       at java.lang.Class.getConstructor0(Unknown Source)
  19:43:10 [SEVERE]       at java.lang.Class.getConstructor(Unknown Source)
  19:43:10 [SEVERE]       at us.zsugano.itemsave.commands.CommandManager.loadComma
  nds(CommandManager.java:32)
  19:43:10 [SEVERE]       at us.zsugano.itemsave.commands.CommandManager.&lt;init&gt;(Co
  mmandManager.java:23)
  19:43:10 [SEVERE]       at us.zsugano.itemsave.ItemSave.onEnable(ItemSave.java:1
  9)
  19:43:10 [SEVERE]       at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlug
  in.java:217)
  19:43:10 [SEVERE]       at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(
  JavaPluginLoader.java:457)
  19:43:10 [SEVERE]       at org.bukkit.plugin.SimplePluginManager.enablePlugin(Si
  mplePluginManager.java:381)
  19:43:10 [SEVERE]       at org.bukkit.craftbukkit.v1_6_R2.CraftServer.loadPlugin
  (CraftServer.java:282)
  19:43:10 [SEVERE]       at org.bukkit.craftbukkit.v1_6_R2.CraftServer.enablePlug
  ins(CraftServer.java:264)
  19:43:10 [SEVERE]       at net.minecraft.server.v1_6_R2.MinecraftServer.l(Minecr
  aftServer.java:313)
  19:43:10 [SEVERE]       at net.minecraft.server.v1_6_R2.MinecraftServer.f(Minecr
  aftServer.java:290)
  19:43:10 [SEVERE]       at net.minecraft.server.v1_6_R2.MinecraftServer.a(Minecr
  aftServer.java:250)
  19:43:10 [SEVERE]       at net.minecraft.server.v1_6_R2.DedicatedServer.init(Ded
  icatedServer.java:151)
  19:43:10 [SEVERE]       at net.minecraft.server.v1_6_R2.MinecraftServer.run(Mine
  craftServer.java:391)
  19:43:10 [SEVERE]       at net.minecraft.server.v1_6_R2.ThreadServerApplication.
  run(SourceFile:582)
  </code></pre>