Search in sources :

Example 6 with Dependencies

use of com.github.sevntu.checkstyle.domain.Dependencies in project methods-distance by sevntu-checkstyle.

the class MethodCallDependencyCheckstyleModule method finishTree.

@Override
public void finishTree(DetailAST rootAST) {
    topLevelClass.ifPresent(enclosingClass -> {
        consumer.ifPresent(informationConsumer -> {
            final Dependencies dependencies = buildDependencies(enclosingClass, methodInvocations);
            final String inputFilePath = new File(getFileContents().getFileName()).toURI().getPath();
            informationConsumer.accept(inputFilePath, dependencies);
        });
    });
}
Also used : Dependencies(com.github.sevntu.checkstyle.domain.Dependencies) File(java.io.File)

Aggregations

Dependencies (com.github.sevntu.checkstyle.domain.Dependencies)6 MethodOrder (com.github.sevntu.checkstyle.ordering.MethodOrder)4 DependencyInformationConsumer (com.github.sevntu.checkstyle.module.DependencyInformationConsumer)3 Configuration (com.puppycrawl.tools.checkstyle.api.Configuration)3 File (java.io.File)3 Map (java.util.Map)3 MethodCallDependencyCheckInvoker (com.github.sevntu.checkstyle.common.MethodCallDependencyCheckInvoker)2 Method (com.github.sevntu.checkstyle.ordering.Method)2 FileUtils (com.github.sevntu.checkstyle.utils.FileUtils)2 CheckstyleException (com.puppycrawl.tools.checkstyle.api.CheckstyleException)2 IOException (java.io.IOException)2 HashMap (java.util.HashMap)2 List (java.util.List)2 DependencyInformationConsumerInjector (com.github.sevntu.checkstyle.common.DependencyInformationConsumerInjector)1 BaseCheckTestSupport (com.github.sevntu.checkstyle.domain.BaseCheckTestSupport)1 ClassDefinition (com.github.sevntu.checkstyle.domain.ClassDefinition)1 ExpectedDependencies (com.github.sevntu.checkstyle.domain.ExpectedDependencies)1 ResolvedCall (com.github.sevntu.checkstyle.domain.ResolvedCall)1 DependencyInfoGraphSerializer (com.github.sevntu.checkstyle.dot.DependencyInfoGraphSerializer)1 AttributeHolder (com.github.sevntu.checkstyle.dot.domain.AttributeHolder)1