All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.structurizr.dsl.ComponentFinderStrategyForEachDslContext Maven / Gradle / Ivy

The newest version!
package com.structurizr.dsl;

import java.util.ArrayList;
import java.util.List;

final class ComponentFinderStrategyForEachDslContext extends DslContext {

    private final List dslLines = new ArrayList<>();

    ComponentFinderStrategyForEachDslContext(ComponentFinderStrategyDslContext dslContext, StructurizrDslParser dslParser) {
        dslContext.getComponentFinderStrategyBuilder().forEach(component -> {
            try {
                dslParser.parse(dslLines, new ComponentDslContext(component));
            } catch (StructurizrDslParserException e) {
                throw new RuntimeException(e);
            }
        });
    }

    void addLine(String line) {
        this.dslLines.add(line);
    }

    @Override
    protected String[] getPermittedTokens() {
        return new String[] {};
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy