code: public static boolean isConstructor(MethodGen mg) {
      if (mg.getName().equals("")) {
        throw new Error("method name cannot be empty");
      }
      return mg.getName().equals("<init>");
    }
docs: Returns whether or not the method is a constructor.
  
  @param mg the MethodGen to test
  @return true iff the method is a constructor