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