1 package org.codehaus.classworlds;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19 import java.util.Collection;
20
21
22
23
24
25
26
27 @Deprecated
28 public class ClassWorld
29 {
30 private ClassWorldAdapter adapter;
31
32 public ClassWorld( String realmId,
33 ClassLoader classLoader )
34 {
35 adapter = ClassWorldAdapter.getInstance(
36 new org.codehaus.plexus.classworlds.ClassWorld( realmId, classLoader ) );
37 }
38
39 public ClassWorld()
40 {
41 adapter = ClassWorldAdapter.getInstance(
42 new org.codehaus.plexus.classworlds.ClassWorld( ) );
43 }
44
45 public ClassWorld( boolean ignore )
46 {
47
48 }
49
50 public ClassRealm newRealm( String id )
51 throws DuplicateRealmException
52 {
53 return adapter.newRealm( id );
54 }
55
56 public ClassRealm newRealm( String id,
57 ClassLoader classLoader )
58 throws DuplicateRealmException
59 {
60 return adapter.newRealm( id, classLoader );
61 }
62
63 public void disposeRealm( String id )
64 throws NoSuchRealmException
65 {
66 adapter.disposeRealm( id );
67 }
68
69 public ClassRealm getRealm( String id )
70 throws NoSuchRealmException
71 {
72 return adapter.getRealm( id );
73 }
74
75 public Collection getRealms()
76 {
77 return adapter.getRealms();
78 }
79 }