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

com.structurizr.inspection.Inspector Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package com.structurizr.inspection;

import com.structurizr.Workspace;

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

public abstract class Inspector {

    private final Workspace workspace;

    private final List violations = new ArrayList<>();
    private int numberOfInspections = 0;

    protected Inspector(Workspace workspace) {
        this.workspace = workspace;
    }

    public Workspace getWorkspace() {
        return workspace;
    }

    public List getViolations() {
        return new ArrayList<>(violations);
    }

    public int getNumberOfInspections() {
        return numberOfInspections;
    }

    protected void add(Violation violation) {
        numberOfInspections++;

        if (violation != null) {
            violations.add(violation);
        }
    }

    public abstract SeverityStrategy getSeverityStrategy();

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy