Class ProjectFactory


  • public class ProjectFactory
    extends Object
    Class acting as a factory for the different project types.
    Since:
    0.1.0
    Author:
    nandorholozsnyak
    • Method Detail

      • ofMavenProject

        public static MavenProject ofMavenProject​(File basedir,
                                                  String name)
        Creates a MavenProject instance with a basedir and the module's name.
        Parameters:
        basedir - base directory for the project.
        name - name of the project.
        Returns:
        created MavenProject instance.
      • ofMavenProject

        public static MavenProject ofMavenProject​(File basedir,
                                                  String name,
                                                  List<String> modules)
        Creates a MavenProject instance with a basedir and the module's name with modules.
        Parameters:
        basedir - base directory for the project.
        name - name of the project.
        modules - module list.
        Returns:
        created MavenProject instance.
      • ofGradleProject

        public static GradleProject ofGradleProject​(File basedir,
                                                    String name)
        Creates a GradleProject instance with a basedir and the module's name.
        Parameters:
        basedir - base directory for the project.
        name - name of the project.
        Returns:
        created GradleProject instance.
      • ofGradleProject

        public static GradleProject ofGradleProject​(File basedir,
                                                    String name,
                                                    List<String> modules)
        Creates a GradleProject instance with a basedir and the module's name with modules.
        Parameters:
        basedir - base directory for the project.
        name - name of the project.
        modules - module list.
        Returns:
        created GradleProject instance.
      • ofSimpleProject

        public static SimpleProject ofSimpleProject​(File basedir,
                                                    String name)
        Creates a SimpleProject instance with a basedir and the module's name.
        Parameters:
        basedir - base directory for the project.
        name - name of the project.
        Returns:
        created SimpleProject instance.
      • ofType

        public static Project ofType​(File basedir,
                                     String name,
                                     ProjectType projectType)
        Creates a Project instance with a basedir and the module's name based on the incoming project type.
        Parameters:
        basedir - base directory for the project.
        name - name of the project.
        Returns:
        proper Project subclass instance.
      • ofTypeWithModules

        public static Project ofTypeWithModules​(File basedir,
                                                String name,
                                                List<String> modules,
                                                ProjectType projectType)
        Creates a Project instance with a basedir and the module's name based and modules on the incoming project type.
        Parameters:
        basedir - base directory for the project.
        name - name of the project.
        modules - module list.
        Returns:
        proper Project subclass instance.