File: Root.java

package info (click to toggle)
castor 1.3.2-7
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 44,976 kB
  • sloc: java: 206,032; xml: 95,088; sql: 14,460; sh: 365; makefile: 10
file content (48 lines) | stat: -rw-r--r-- 1,456 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/**
 * The root class, holding our links to NativeCollections and GSCollections.
 * NativeCollections tests native accessors, and throws exceptions when non-native
 * accessors are used.
 * GSCollections does the same, in reverse - if natives are used, it will throw
 * exceptions.
 * 
 * All classes have a minefield of other methods that shouldn't ever get called; if any
 * of them do, an immediate exception will be thrown.
 * 
 * @author gblock
 *
 */
public class Root {
	private NativeCollections nativeCollections;
	private GSCollections gsCollections;
	private GACollections gaCollections;
	
	public NativeCollections getNativeCollections() {
		return nativeCollections;
	}
	
	public void setNativeCollections(NativeCollections nc) {
		if (nc==null)throw new RuntimeException("Null sent to setNativeCollections()");
		this.nativeCollections = nc;
		nativeCollections.validate();
	}
	
	public GSCollections getGsCollections() {
		return gsCollections;
	}
	
	public void setGsCollections(GSCollections gc) {
		if (gc==null)throw new RuntimeException("Null sent to setGSCollections()");
		this.gsCollections = gc;
		gsCollections.validate();
	}
	
	public GACollections getGaCollections() {
		return gaCollections;
	}
	
	public void setGaCollections(GACollections ga) {
		if (ga==null)throw new RuntimeException("Null sent to setGACollections()");
		gaCollections = ga;
		gaCollections.validate();
	}
}