1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements. See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 package org.apache.commons.jci.compilers;
19
20
21 /**
22 * Most common denominator for JavaCompiler settings.
23 *
24 * If you need more specific settings you have to provide
25 * the native compiler configurations to the compilers.
26 * Writing of a custom factory is suggested.
27 *
28 * @author tcurdt
29 */
30 public class JavaCompilerSettings {
31
32 private String targetVersion;
33 private String sourceVersion;
34 private String sourceEncoding;
35 private boolean warnings;
36 private boolean deprecations;
37 private boolean verbose;
38
39
40 public void setTargetVersion( final String pTargetVersion ) {
41 targetVersion = pTargetVersion;
42 }
43
44 public String getTargetVersion() {
45 return targetVersion;
46 }
47
48
49 public void setSourceVersion( final String pSourceVersion ) {
50 sourceVersion = pSourceVersion;
51 }
52
53 public String getSourceVersion() {
54 return sourceVersion;
55 }
56
57
58 public void setSourceEncoding( final String pSourceEncoding ) {
59 sourceEncoding = pSourceEncoding;
60 }
61
62 public String getSourceEncoding() {
63 return sourceEncoding;
64 }
65
66
67 public void setWarnings( final boolean pWarnings ) {
68 warnings = pWarnings;
69 }
70
71 public boolean isWarnings() {
72 return warnings;
73 }
74
75
76 public void setDeprecations( final boolean pDeprecations ) {
77 deprecations = pDeprecations;
78 }
79
80 public boolean isDeprecations() {
81 return deprecations;
82 }
83
84
85 public void setVerbose( final boolean pVerbose ) {
86 verbose = pVerbose;
87 }
88
89 public boolean isVerbose() {
90 return verbose;
91 }
92
93 }