2 package org
.de
.metux
.treebuild
.conf
;
4 import java
.util
.Hashtable
;
5 import java
.util
.Properties
;
6 import java
.util
.Enumeration
;
10 Hashtable features
= new Hashtable();
11 Hashtable headers
= new Hashtable();
12 Hashtable substitutes
= new Hashtable();
14 Feature features_cache
[];
15 HeaderFile headers_cache
[];
17 public Feature
[] getFeatures()
19 if (features_cache
==null)
21 features_cache
= new Feature
[features
.size()];
23 for (Enumeration e
=features
.keys(); e
.hasMoreElements(); )
24 features_cache
[x
++] = (Feature
)features
.get((String
)e
.nextElement());
26 return features_cache
;
29 public HeaderFile
[] getHeaderFiles()
31 if (headers_cache
==null)
33 headers_cache
= new HeaderFile
[features
.size()];
35 for (Enumeration e
=headers
.keys(); e
.hasMoreElements(); )
36 headers_cache
[x
++] = (HeaderFile
)headers
.get((String
)e
.nextElement());
45 public void addFeature(Properties prop
)
47 Feature f
= new Feature(prop
);
48 features
.put(f
.name
, f
);
51 public void addHeader(Properties prop
)
53 HeaderFile h
= new HeaderFile(prop
);
54 headers
.put(h
.name
, h
);
57 public void addSubstitute(Properties prop
)
59 Substitute s
= new Substitute(prop
);
60 substitutes
.put(s
.name
, s
);