View Javadoc
1   package org.apache.maven.classrealm;
2   
3   /*
4    * Licensed to the Apache Software Foundation (ASF) under one
5    * or more contributor license agreements.  See the NOTICE file
6    * distributed with this work for additional information
7    * regarding copyright ownership.  The ASF licenses this file
8    * to you under the Apache License, Version 2.0 (the
9    * "License"); you may not use this file except in compliance
10   * with the License.  You may obtain a copy of the License at
11   *
12   *   http://www.apache.org/licenses/LICENSE-2.0
13   *
14   * Unless required by applicable law or agreed to in writing,
15   * software distributed under the License is distributed on an
16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17   * KIND, either express or implied.  See the License for the
18   * specific language governing permissions and limitations
19   * under the License.
20   */
21  
22  import java.util.List;
23  import java.util.Map;
24  
25  /**
26   * @author Benjamin Bentmann
27   */
28  class DefaultClassRealmRequest
29      implements ClassRealmRequest
30  {
31  
32      private final RealmType type;
33  
34      private final ClassLoader parent;
35  
36      private final List<String> parentImports;
37  
38      private final Map<String, ClassLoader> foreignImports;
39  
40      private final List<ClassRealmConstituent> constituents;
41  
42      DefaultClassRealmRequest( RealmType type, ClassLoader parent, List<String> parentImports,
43                                Map<String, ClassLoader> foreignImports, List<ClassRealmConstituent> constituents )
44      {
45          this.type = type;
46          this.parent = parent;
47          this.parentImports = parentImports;
48          this.foreignImports = foreignImports;
49          this.constituents = constituents;
50      }
51  
52      public RealmType getType()
53      {
54          return type;
55      }
56  
57      public ClassLoader getParent()
58      {
59          return parent;
60      }
61  
62      public List<String> getImports()
63      {
64          return getParentImports();
65      }
66  
67      public List<String> getParentImports()
68      {
69          return parentImports;
70      }
71  
72      public Map<String, ClassLoader> getForeignImports()
73      {
74          return foreignImports;
75      }
76  
77      public List<ClassRealmConstituent> getConstituents()
78      {
79          return constituents;
80      }
81  
82  }