class AbstractDeploymentDescriptor implements DeploymentDescriptor {

    protected final Properties                        properties;

    protected final DeploymentDescriptorConfiguration deploymentDescriptorConfiguration;

    protected final ClassLoader                       classLoader;

    protected final URL                               url;

    protected final List<String>                      installedSpringXml = new ArrayList<>();

    protected final Map<String, Resource>             springResources    = new HashMap<>();

    protected final String                            moduleName;

    protected final String                            name;

    protected final List<String>                      requiredModules;

    protected final String                            parentModule;

    protected ApplicationContext                      applicationContext;

    protected long                                    startTime;

    protected long                                    elapsedTime;

    private boolean                                   ignoreRequireModule;

    public AbstractDeploymentDescriptor(URL url,
                                        Properties properties,
                                        DeploymentDescriptorConfiguration deploymentDescriptorConfiguration,
                                        ClassLoader classLoader) {
        this.url = url;
        this.properties = properties;
        this.deploymentDescriptorConfiguration = deploymentDescriptorConfiguration;
        this.classLoader = classLoader;
        this.moduleName = getModuleNameFromProperties();
        this.name = getNameFormUrl();
        this.parentModule = getSpringParentFromProperties();
        this.requiredModules = getRequiredModulesFromProperties();
    }

    @Override
    public String getModuleName() {
        return moduleName;
    }

    @Override
    public String getName() {
        return name;
    }

    @Override
    public List<String> getRequiredModules() {
        if (ignoreRequireModule) {
            return null;
        }
        return requiredModules;
    }

    @Override
    public String getSpringParent() {
        return parentModule;
    }

    @Override
    public String getProperty(String key) {
        return properties.getProperty(key);
    }

    @Override
    public ClassLoader getClassLoader() {
        return classLoader;
    }

    @Override
    public ApplicationContext getApplicationContext() {
        return applicationContext;
    }

    @Override
    public Map<String, Resource> getSpringResources() {
        return springResources;
    }

    @Override
    public boolean isSpringPowered() {
        return !springResources.isEmpty();
    }

    @Override
    public void addInstalledSpringXml(String fileName) {
        installedSpringXml.add(fileName);
    }

    @Override
    public void startDeploy() {
        startTime = System.currentTimeMillis();
    }

    @Override
    public void deployFinish() {
        elapsedTime = System.currentTimeMillis() - startTime;
    }

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) {
        this.applicationContext = applicationContext;
    }

    @Override
    public long getElapsedTime() {
        return elapsedTime;
    }

    @Override
    public long getStartTime() {
        return startTime;
    }

    @Override
    public List<String> getInstalledSpringXml() {
        Collections.sort(installedSpringXml);
        return installedSpringXml;
    }

    @Override
    public int compareTo(DeploymentDescriptor o) {
        return this.getName().compareTo(o.getName());
    }

    @Override
    public void setIgnoreRequireModule(boolean ignoreRequireModule) {
        this.ignoreRequireModule = ignoreRequireModule;
    }

    protected String getModuleNameFromProperties() {
        List<String> moduleNameIdentities = deploymentDescriptorConfiguration
            .getModuleNameIdentities();

        if (CollectionUtils.isEmpty(moduleNameIdentities)) {
            return null;
        }

        for (String moduleNameIdentity : moduleNameIdentities) {
            List<String> moduleNames = getFormattedModuleInfo(moduleNameIdentity);
            if (!CollectionUtils.isEmpty(moduleNames)) {
                return moduleNames.get(0);
            }
        }
        return null;
    }

    protected String getNameFormUrl() {
        int jarIndex = url.toString().lastIndexOf(".jar");
        if (jarIndex == -1) {
            String moduleName = getModuleName();
            return moduleName == null ? "" : moduleName;
        }

        String jarPath = url.toString().substring(0, jarIndex + ".jar".length());
        int lastIndex = jarPath.lastIndexOf("/");
        return jarPath.substring(lastIndex + 1);
    }

    protected List<String> getRequiredModulesFromProperties() {
        List<String> requires = new ArrayList<>();

        List<String> requireModuleIdentities = deploymentDescriptorConfiguration
            .getRequireModuleIdentities();

        if (CollectionUtils.isEmpty(requireModuleIdentities)) {
            return requires;
        }

        for (String requireModuleIdentity : requireModuleIdentities) {
            List<String> requireModules = getFormattedModuleInfo(requireModuleIdentity);
            if (!CollectionUtils.isEmpty(requireModules)) {
                requires.addAll(requireModules);
                break;
            }
        }

        String springParent = getSpringParent();
        if (StringUtils.hasText(springParent)) {
            requires.add(springParent);
        }
        return requires.stream().distinct().collect(Collectors.toList());
    }

    protected String getSpringParentFromProperties() {
        List<String> name = getFormattedModuleInfo(DeploymentDescriptorConfiguration.SPRING_PARENT);
        return CollectionUtils.isEmpty(name) ? null : name.get(0);
    }

    protected List<String> getFormattedModuleInfo(String key) {<FILL_FUNCTION_BODY>}

    /**
     * Actually load spring xml resources.
     */
    protected abstract void loadSpringXMLs();

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof AbstractDeploymentDescriptor that)) {
            return false;
        }
        return Objects.equals(this.getModuleName(), that.getModuleName());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getModuleName());
    }
}

        String ret = properties.getProperty(key);
        if (StringUtils.hasText(ret)) {
            String[] array = StringUtils.commaDelimitedListToStringArray(ret);
            List<String> list = new ArrayList<>(array.length);
            for (String item : array) {
                int idx = item.indexOf(';');
                if (idx > -1) {
                    item = item.substring(0, idx);
                }
                list.add(item.trim());
            }
            return list;
        }
        return null;
    
<no_super_class>