1
2
3
4
5
6 package gov.nist.secauto.metaschema.databind.codegen;
7
8 import gov.nist.secauto.metaschema.core.model.IModule;
9 import gov.nist.secauto.metaschema.core.util.ObjectUtils;
10 import gov.nist.secauto.metaschema.databind.model.IBoundModule;
11
12 import java.util.Collection;
13
14 import edu.umd.cs.findbugs.annotations.NonNull;
15
16
17
18
19
20 public interface IGeneratedModuleClass extends IGeneratedClass {
21
22
23
24
25
26
27 @NonNull
28 IModule getModule();
29
30
31
32
33
34
35 @NonNull
36 String getPackageName();
37
38
39
40
41
42
43
44 @NonNull
45 Collection<IGeneratedDefinitionClass> getGeneratedDefinitionClasses();
46
47
48
49
50
51
52
53
54
55
56
57 @SuppressWarnings("unchecked")
58 @NonNull
59 default Class<? extends IBoundModule> load(@NonNull ClassLoader classLoader) throws ClassNotFoundException {
60 return ObjectUtils.notNull((Class<? extends IBoundModule>) classLoader.loadClass(getClassName().reflectionName()));
61 }
62 }