entlicher commented on a change in pull request #3180:
URL: https://github.com/apache/netbeans/pull/3180#discussion_r719284439



##########
File path: 
ide/nativeimage.api/src/org/netbeans/modules/nativeimage/api/debug/StartDebugParameters.java
##########
@@ -0,0 +1,188 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.netbeans.modules.nativeimage.api.debug;
+
+import java.io.File;
+import java.util.List;
+import org.netbeans.api.extexecution.ExecutionDescriptor;
+import org.openide.util.Lookup;
+
+/**
+ * Parameters passed to {@link 
NIDebugger#start(org.netbeans.modules.nativeimage.api.debug.StartDebugParameters,
 java.util.function.Consumer)}.
+ *
+ * @since 0.5
+ */
+public final class StartDebugParameters {
+
+    private final List<String> command;
+    private final File workingDirectory;
+    private final String debugger;
+    private final String displayName;
+    private final ExecutionDescriptor executionDescriptor;
+    private final Lookup contextLookup;
+
+    private StartDebugParameters(List<String> command, File workingDirectory, 
String debugger, String displayName, ExecutionDescriptor executionDescriptor, 
Lookup contextLookup) {
+        this.command = command;
+        this.workingDirectory = workingDirectory;
+        this.debugger = debugger;
+        this.displayName = displayName;
+        this.executionDescriptor = executionDescriptor;
+        this.contextLookup = contextLookup;
+    }
+
+    /**
+     * The command to run the native image.
+     *
+     * @return the command with arguments.
+     */
+    public List<String> getCommand() {
+        return command;
+    }
+
+    /**
+     * Working directory of the process.
+     *
+     * @return the working directory
+     */
+    public File getWorkingDirectory() {
+        return workingDirectory;
+    }
+
+    /**
+     * The native debugger command.
+     *
+     * @return the debugger command
+     */
+    public String getDebugger() {
+        return debugger;
+    }
+
+    /**
+     * Display name of the debugger task.
+     *
+     * @return the display name of debugger task
+     */
+    public String getDisplayName() {
+        return displayName;
+    }
+
+    /**
+     * Execution descriptor that describes the runtime attributes.
+     *
+     * @return the execution descriptor
+     */
+    public ExecutionDescriptor getExecutionDescriptor() {
+        return executionDescriptor;
+    }
+
+    /**
+     * Context lookup. The lookup may contain other parameters, like 
ExplicitProcessParameters.
+     *
+     * @return the context lookup
+     */
+    public Lookup getContextLookup() {
+        return contextLookup;
+    }
+
+    /**
+     * Create a new debug parameters builder.
+     *
+     * @param command the command to run the native image.
+     * @return a new builder
+     */
+    public static Builder newBuilder(List<String> command) {

Review comment:
       Well, `ExplicitProcessParameters` and `ProcessBuilder` have both list 
and vararg methods. List is used in the implementation, hence I've added a list 
method into the API. A method that takes vararg can be easily added in the 
future when the appropriate use-case emerges.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to