1 /*
2 * #%L
3 * Native ARchive plugin for Maven
4 * %%
5 * Copyright (C) 2002 - 2014 NAR Maven Plugin developers.
6 * %%
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * #L%
19 */
20 package com.github.maven_nar.cpptasks;
21
22 /**
23 * A description of a file built or to be built
24 */
25 public final class TargetHistory {
26 private final/* final */String config;
27 private final/* final */String output;
28 private final/* final */long outputLastModified;
29 private final/* final */SourceHistory[] sources;
30
31 /**
32 * Constructor from build step
33 */
34 public TargetHistory(final String config, final String output, final long outputLastModified,
35 final SourceHistory[] sources) {
36 if (config == null) {
37 throw new NullPointerException("config");
38 }
39 if (sources == null) {
40 throw new NullPointerException("source");
41 }
42 if (output == null) {
43 throw new NullPointerException("output");
44 }
45 this.config = config;
46 this.output = output;
47 this.outputLastModified = outputLastModified;
48 this.sources = sources.clone();
49 }
50
51 public String getOutput() {
52 return this.output;
53 }
54
55 public long getOutputLastModified() {
56 return this.outputLastModified;
57 }
58
59 public String getProcessorConfiguration() {
60 return this.config;
61 }
62
63 public SourceHistory[] getSources() {
64 final SourceHistory[] clone = this.sources.clone();
65 return clone;
66 }
67 }