private ClassLoaderConfigurer(List<ModuleConfig> moduleConfigs, boolean enableSharing, Conf classLoadingConf) {
this.moduleConfigs = moduleConfigs;
this.enableSharing = enableSharing;
Conf requiredConf = classLoadingConf.getChild("required", false);
Conf allowedConf = classLoadingConf.getChild("allowed", false);
if (requiredConf != null) {
String requiredSharingStr = requiredConf.getAttribute("on-conflict", requiredSharingConflictResolution.getName());
requiredSharingConflictResolution = SharingConflictResolution.fromString(requiredSharingStr);
if (requiredSharingConflictResolution == null || requiredSharingConflictResolution.equals(SharingConflictResolution.DONTSHARE)) {
throw new LilyRTException("Illegal value for required sharing conflict resolution (@on-conflict: " + requiredSharingStr, requiredConf.getLocation());
}
}
if (allowedConf != null) {
String allowedSharingStr = allowedConf.getAttribute("on-conflict", allowedSharingConflictResolution.getName());
allowedSharingConflictResolution = SharingConflictResolution.fromString(allowedSharingStr);
if (allowedSharingConflictResolution == null) {
throw new LilyRTException("Illegal value for allowed sharing conflict resolution (@on-conflict: " + allowedSharingStr, requiredConf.getLocation());
}
}