View Javadoc
1   /*
2    * Copyright (C) 2025 the original author or authors.
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 org.codehaus.gmavenplus.model;
18  
19  import java.io.File;
20  import java.io.Serializable;
21  import java.util.List;
22  import java.util.Set;
23  
24  /**
25   * Holds configuration for Groovy stub generation.
26   *
27   * @author Keegan Witt
28   */
29  public class GroovyStubConfiguration implements Serializable {
30      private static final long serialVersionUID = 1L;
31  
32      private Set<File> stubSources;
33      private List<?> classpath;
34      private File outputDirectory;
35      private IncludeClasspath includeClasspath;
36      private boolean skipBytecodeCheck;
37      private boolean debug;
38      private boolean verbose;
39      private int warningLevel;
40      private int tolerance;
41      private String sourceEncoding;
42      private String targetBytecode;
43  
44      public GroovyStubConfiguration(Set<File> stubSources, List<?> classpath, File outputDirectory) {
45          this.stubSources = stubSources;
46          this.classpath = classpath;
47          this.outputDirectory = outputDirectory;
48      }
49  
50      public Set<File> getStubSources() {
51          return stubSources;
52      }
53  
54      public List<?> getClasspath() {
55          return classpath;
56      }
57  
58      public File getOutputDirectory() {
59          return outputDirectory;
60      }
61  
62      public IncludeClasspath getIncludeClasspath() {
63          return includeClasspath;
64      }
65  
66      public void setIncludeClasspath(IncludeClasspath includeClasspath) {
67          this.includeClasspath = includeClasspath;
68      }
69  
70      public boolean isSkipBytecodeCheck() {
71          return skipBytecodeCheck;
72      }
73  
74      public void setSkipBytecodeCheck(boolean skipBytecodeCheck) {
75          this.skipBytecodeCheck = skipBytecodeCheck;
76      }
77  
78      public boolean isDebug() {
79          return debug;
80      }
81  
82      public void setDebug(boolean debug) {
83          this.debug = debug;
84      }
85  
86      public boolean isVerbose() {
87          return verbose;
88      }
89  
90      public void setVerbose(boolean verbose) {
91          this.verbose = verbose;
92      }
93  
94      public int getWarningLevel() {
95          return warningLevel;
96      }
97  
98      public void setWarningLevel(int warningLevel) {
99          this.warningLevel = warningLevel;
100     }
101 
102     public int getTolerance() {
103         return tolerance;
104     }
105 
106     public void setTolerance(int tolerance) {
107         this.tolerance = tolerance;
108     }
109 
110     public String getSourceEncoding() {
111         return sourceEncoding;
112     }
113 
114     public void setSourceEncoding(String sourceEncoding) {
115         this.sourceEncoding = sourceEncoding;
116     }
117 
118     public String getTargetBytecode() {
119         return targetBytecode;
120     }
121 
122     public void setTargetBytecode(String targetBytecode) {
123         this.targetBytecode = targetBytecode;
124     }
125 }