comparison graal/com.oracle.truffle.ruby.shell/src/com/oracle/truffle/ruby/shell/CommandLineOptions.java @ 13514:0fbee3eb71f0

Ruby: import project.
author Chris Seaton <chris.seaton@oracle.com>
date Mon, 06 Jan 2014 17:12:09 +0000
parents
children
comparison
equal deleted inserted replaced
13513:64a23ce736a0 13514:0fbee3eb71f0
1 /*
2 * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. This
3 * code is released under a tri EPL/GPL/LGPL license. You can use it,
4 * redistribute it and/or modify it under the terms of the:
5 *
6 * Eclipse Public License version 1.0
7 * GNU General Public License version 2
8 * GNU Lesser General Public License version 2.1
9 */
10 package com.oracle.truffle.ruby.shell;
11
12 import java.util.*;
13
14 import com.oracle.truffle.ruby.runtime.configuration.*;
15
16 /**
17 * Options resulting from parsing a command line by {@link CommandLineParser}.
18 */
19 public class CommandLineOptions {
20
21 private final List<String> preRequires;
22 private final String preChangeDirectory;
23
24 private final List<String> extraLoadPath;
25
26 private final String programFile;
27 private final List<String> commandLineScripts;
28 private final List<String> programArgs;
29 private final List<String> switchArgs;
30
31 private final int recordSeparator;
32 private final boolean autosplit;
33 private final String autosplitPattern;
34 private final boolean checkSyntaxOnly;
35 private final boolean lineEndingProcessing;
36 private final boolean inPlaceEdit;
37 private final String inPlaceBackupExtension;
38 private final boolean implicitLoop;
39 private final boolean implicitSedLoop;
40 private final boolean importFromPath;
41 private final boolean stripMessage;
42 private final boolean useJLine;
43
44 private final Configuration configuration;
45
46 public CommandLineOptions(List<String> preRequires, String preChangeDirectory, List<String> extraLoadPath, String programFile, List<String> commandLineScripts, List<String> programArgs,
47 List<String> switchArgs, int recordSeparator, boolean autosplit, String autosplitPattern, boolean checkSyntaxOnly, boolean lineEndingProcessing, boolean inPlaceEdit,
48 String inPlaceBackupExtension, boolean implicitLoop, boolean implicitSedLoop, boolean importFromPath, boolean stripMessage, boolean useJLine, Configuration configuration) {
49 this.preRequires = preRequires;
50 this.preChangeDirectory = preChangeDirectory;
51 this.extraLoadPath = extraLoadPath;
52 this.programFile = programFile;
53 this.commandLineScripts = commandLineScripts;
54 this.programArgs = programArgs;
55 this.switchArgs = switchArgs;
56 this.recordSeparator = recordSeparator;
57 this.autosplit = autosplit;
58 this.autosplitPattern = autosplitPattern;
59 this.checkSyntaxOnly = checkSyntaxOnly;
60 this.lineEndingProcessing = lineEndingProcessing;
61 this.inPlaceEdit = inPlaceEdit;
62 this.inPlaceBackupExtension = inPlaceBackupExtension;
63 this.implicitLoop = implicitLoop;
64 this.implicitSedLoop = implicitSedLoop;
65 this.importFromPath = importFromPath;
66 this.stripMessage = stripMessage;
67 this.useJLine = useJLine;
68 this.configuration = configuration;
69 }
70
71 public List<String> getPreRequires() {
72 return preRequires;
73 }
74
75 public String getPreChangeDirectory() {
76 return preChangeDirectory;
77 }
78
79 public List<String> getExtraLoadPath() {
80 return extraLoadPath;
81 }
82
83 public String getProgramFile() {
84 return programFile;
85 }
86
87 public List<String> getCommandLineScripts() {
88 return commandLineScripts;
89 }
90
91 public List<String> getProgramArgs() {
92 return programArgs;
93 }
94
95 public List<String> getSwitchArgs() {
96 return switchArgs;
97 }
98
99 public int getRecordSeparator() {
100 return recordSeparator;
101 }
102
103 public String getAutosplitPattern() {
104 return autosplitPattern;
105 }
106
107 public boolean isAutosplit() {
108 return autosplit;
109 }
110
111 public boolean isCheckSyntaxOnly() {
112 return checkSyntaxOnly;
113 }
114
115 public boolean isLineEndingProcessing() {
116 return lineEndingProcessing;
117 }
118
119 public boolean isInPlaceEdit() {
120 return inPlaceEdit;
121 }
122
123 public String getInPlaceBackupExtension() {
124 return inPlaceBackupExtension;
125 }
126
127 public boolean isImplicitLoop() {
128 return implicitLoop;
129 }
130
131 public boolean isImplicitSedLoop() {
132 return implicitSedLoop;
133 }
134
135 public boolean isImportFromPath() {
136 return importFromPath;
137 }
138
139 public boolean isStripMessage() {
140 return stripMessage;
141 }
142
143 public boolean useJLine() {
144 return useJLine;
145 }
146
147 public Configuration getConfiguration() {
148 return configuration;
149 }
150
151 }