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

com.structurizr.inspection.view.AbstractViewInspection Maven / Gradle / Ivy

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

import com.structurizr.inspection.Inspection;
import com.structurizr.inspection.Inspector;
import com.structurizr.inspection.Severity;
import com.structurizr.inspection.Violation;
import com.structurizr.view.View;

abstract class AbstractViewInspection extends Inspection {

    public AbstractViewInspection(Inspector inspector) {
        super(inspector);
    }

    public final Violation run(View view) {
        Severity severity = getInspector().getSeverityStrategy().getSeverity(this, view);
        Violation violation = inspect(view);

        return violation == null ? null : violation.withSeverity(severity);
    }

    protected abstract Violation inspect(View view);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy