]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/Cpptasks/net/sf/antcontrib/cpptasks/DependencyInfo.java
Changed spelling to manifest
[mirror_edk2.git] / Tools / Source / Cpptasks / net / sf / antcontrib / cpptasks / DependencyInfo.java
1 /*
2 *
3 * Copyright 2002-2004 The Ant-Contrib project
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * 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 package net.sf.antcontrib.cpptasks;
18 import java.util.Vector;
19 /**
20 * @author Curt Arnold
21 */
22 public final class DependencyInfo {
23 /**
24 * Last modified time of this file or anything that it depends on.
25 *
26 * Not persisted since almost any change could invalidate it. Initialized
27 * to long.MIN_VALUE on construction.
28 */
29 private long compositeLastModified;
30 private/* final */String includePathIdentifier;
31 private/* final */String[] includes;
32 private/* final */String source;
33 private/* final */long sourceLastModified;
34 private/* final */String[] sysIncludes;
35 public DependencyInfo(String includePathIdentifier, String source,
36 long sourceLastModified, Vector includes, Vector sysIncludes) {
37 if (source == null) {
38 throw new NullPointerException("source");
39 }
40 if (includePathIdentifier == null) {
41 throw new NullPointerException("includePathIdentifier");
42 }
43 this.source = source;
44 this.sourceLastModified = sourceLastModified;
45 this.includePathIdentifier = includePathIdentifier;
46 this.includes = new String[includes.size()];
47 if (includes.size() == 0) {
48 compositeLastModified = sourceLastModified;
49 } else {
50 includes.copyInto(this.includes);
51 compositeLastModified = Long.MIN_VALUE;
52 }
53 this.sysIncludes = new String[sysIncludes.size()];
54 sysIncludes.copyInto(this.sysIncludes);
55 }
56 /**
57 * Returns the latest modification date of the source or anything that it
58 * depends on.
59 *
60 * @returns the composite lastModified time, returns Long.MIN_VALUE if not
61 * set
62 */
63 public long getCompositeLastModified() {
64 return compositeLastModified;
65 }
66 public String getIncludePathIdentifier() {
67 return includePathIdentifier;
68 }
69 public String[] getIncludes() {
70 String[] includesClone = (String[]) includes.clone();
71 return includesClone;
72 }
73 public String getSource() {
74 return source;
75 }
76 public long getSourceLastModified() {
77 return sourceLastModified;
78 }
79 public String[] getSysIncludes() {
80 String[] sysIncludesClone = (String[]) sysIncludes.clone();
81 return sysIncludesClone;
82 }
83 public void setCompositeLastModified(long lastMod) {
84 compositeLastModified = lastMod;
85 }
86 }