code: public final SgClass create(final String implPackageName, final String implClassName,
              final SgClass superClass, final SgClass enclosingClass,
              final ImplementationFactoryListener listener, final Class<?>... intf) {
  
          assureNotNull("implPackageName", implPackageName);
          assureNotNull("implClassName", implClassName);
          assureNotNull("listener", listener);
          assureNotNull("intf", intf);
          assureNotEmpty("intf", intf);
          assureAllInterfaces(intf);
  
          // Create class with all interfaces
          final SgClass clasz = new SgClass("public", implPackageName, implClassName, superClass,
                  false, enclosingClass);
          for (int i = 0; i < intf.length; i++) {
              clasz.addInterface(SgClass.create(pool, intf[i]));
          }
          listener.afterClassCreated(clasz);
  
          final Map<String, ImplementedMethod> implMethods = new HashMap<String, ImplementedMethod>();
  
          // Iterate through interfaces and add methods
          for (int i = 0; i < intf.length; i++) {
              addInterfaceMethods(implMethods, clasz, intf[i], listener);
          }
  
          // Iterate through methods and create body
          final Iterator<String> it = implMethods.keySet().iterator();
          while (it.hasNext()) {
              final ImplementedMethod implMethod = implMethods.get(it.next());
              final SgMethod method = implMethod.getMethod();
              final Class<?>[] interfaces = implMethod.getInterfaces();
              final List<String> lines = listener.createBody(method, interfaces);
              for (int k = 0; k < lines.size(); k++) {
                  implMethod.getMethod().addBodyLine(lines.get(k));
              }
          }
  
          return clasz;
      }
docs: Creates an implementation of the interface.
  
  @param implPackageName
  Name of the implementation package - Cannot be null.
  @param implClassName
  Name of the implementation class - Cannot be null.
  @param superClass
  Parent class or <code>null</code>.
  @param enclosingClass
  Outer class or <code>null</code>.
  @param listener
  Creates the bodies for all methods - Cannot be null.
  @param intf
  One or more interfaces.
  
  @return New object implementing the interface.