001/*
002 * JDrupes Builder
003 * Copyright (C) 2026 Michael N. Lipp
004 * 
005 * This program is free software: you can redistribute it and/or modify
006 * it under the terms of the GNU Affero General Public License as
007 * published by the Free Software Foundation, either version 3 of the
008 * License, or (at your option) any later version.
009 *
010 * This program is distributed in the hope that it will be useful,
011 * but WITHOUT ANY WARRANTY; without even the implied warranty of
012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
013 * GNU Affero General Public License for more details.
014 *
015 * You should have received a copy of the GNU Affero General Public License
016 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
017 */
018
019package org.jdrupes.builder.distribution.internal;
020
021import java.util.ArrayList;
022import java.util.List;
023
024/// Represents the configuration data for an application.
025///
026@SuppressWarnings("PMD.DataClass")
027public class ApplicationConfigurationData {
028
029    private String executableName;
030    private String mainClassName;
031    private final List<String> defaultJvmArgs = new ArrayList<>();
032
033    /// Initializes a new distribution configuration data.
034    ///
035    public ApplicationConfigurationData() {
036        // Make javadoc happy.
037    }
038
039    /// Returns the name of the generated executable.
040    ///
041    /// @return the string
042    ///
043    public String executableName() {
044        return executableName;
045    }
046
047    /// Sets the name of the generated executable.
048    ///
049    /// @param name the name
050    ///
051    public void executableName(String name) {
052        executableName = name;
053    }
054
055    /// Returns the main class name.
056    ///
057    /// @return the string
058    ///
059    public String mainClassName() {
060        return mainClassName;
061    }
062
063    /// Sets the main class name.
064    ///
065    /// @param name the name
066    ///
067    public void mainClassName(String name) {
068        mainClassName = name;
069    }
070
071    /// Returns a mutable list of JVM arguments.
072    ///
073    /// @return the list
074    ///
075    public List<String> applicationJvmOpts() {
076        return defaultJvmArgs;
077    }
078}