View Javadoc
1   /*
2     Copyright (C) 2020 - 2022 Alexander Kapitman
3   
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7   
8       http://www.apache.org/licenses/LICENSE-2.0
9   
10    Unless required by applicable law or agreed to in writing, software
11    distributed under the License is distributed on an "AS IS" BASIS,
12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    See the License for the specific language governing permissions and
14    limitations under the License.
15  */
16  
17  package ru.akman.maven.plugins.jlink;
18  
19  import java.io.File;
20  
21  /**
22   * Launcher script.
23   */
24  public class Launcher {
25  
26    /**
27     * Launcher command (script) name.
28     */
29    private String command;
30  
31    /**
32     * Main module name.
33     */
34    private String mainmodule;
35  
36    /**
37     * Main class name.
38     */
39    private String mainclass;
40    
41    /**
42     * Java runtime arguments.
43     */
44    private String jvmargs;
45  
46    /**
47     * Command arguments.
48     */
49    private String args;
50  
51    /**
52     * Template file for *nix script.
53     */
54    private File nixtemplate;
55  
56    /**
57     * Template file for windows script.
58     */
59    private File wintemplate;
60    
61    /**
62     * Get command (script) name.
63     *
64     * @return the command (script) name without extension
65     */
66    public String getCommand() {
67      return this.command;
68    }
69    
70    /**
71     * Set command (script) name.
72     *
73     * @param command the name of command (script)
74     */
75    public void setCommand(final String command) {
76      this.command = command;
77    }
78    
79    /**
80     * Get main module name.
81     *
82     * @return the main module name
83     */
84    public String getMainModule() {
85      return this.mainmodule;
86    }
87    
88    /**
89     * Set main module name.
90     *
91     * @param mainmodule the name of main module
92     */
93    public void setMainModule(final String mainmodule) {
94      this.mainmodule = mainmodule;
95    }
96    
97    /**
98     * Get main class name.
99     *
100    * @return the main class name
101    */
102   public String getMainClass() {
103     return this.mainclass;
104   }
105   
106   /**
107    * Set main class name.
108    *
109    * @param mainclass the name of main class
110    */
111   public void setMainClass(final String mainclass) {
112     this.mainclass = mainclass;
113   }
114 
115   /**
116    * Get Java runtime arguments.
117    *
118    * @return the Java runtime arguments
119    */
120   public String getJvmArgs() {
121     return this.jvmargs;
122   }
123   
124   /**
125    * Set Java runtime arguments.
126    *
127    * @param jvmargs Java runtime arguments
128    */
129   public void setJvmArgs(final String jvmargs) {
130     this.jvmargs = jvmargs;
131   }
132 
133   /**
134    * Get command (script) argument.
135    *
136    * @return the command (script) arguments
137    */
138   public String getArgs() {
139     return this.args;
140   }
141   
142   /**
143    * Set command (script) arguments.
144    *
145    * @param args the command (script) arguments
146    */
147   public void setArgs(final String args) {
148     this.args = args;
149   }
150 
151   /**
152    * Get *nix template file.
153    *
154    * @return the *nix template file
155    */
156   public File getNixTemplate() {
157     return this.nixtemplate;
158   }
159   
160   /**
161    * Set *nix template file.
162    *
163    * @param nixtemplate the *nix template file
164    */
165   public void setNixTemplate(final File nixtemplate) {
166     this.nixtemplate = nixtemplate;
167   }
168 
169   /**
170    * Get windows template file.
171    *
172    * @return the windows template file
173    */
174   public File getWinTemplate() {
175     return this.wintemplate;
176   }
177   
178   /**
179    * Set windows template file.
180    *
181    * @param wintemplate the windows template file
182    */
183   public void setWinTemplate(final File wintemplate) {
184     this.wintemplate = wintemplate;
185   }
186 
187 }