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

com.autonomousapps.visitor.GraphViewReader.kt Maven / Gradle / Ivy

There is a newer version: 2.6.1
Show newest version
// Copyright (c) 2024. Tony Robalik.
// SPDX-License-Identifier: Apache-2.0
package com.autonomousapps.visitor

import com.autonomousapps.model.internal.Dependency
import com.autonomousapps.model.internal.DependencyGraphView
import com.autonomousapps.model.DuplicateClass
import com.autonomousapps.model.internal.ProjectVariant
import com.autonomousapps.model.declaration.internal.Declaration

internal class GraphViewReader(
  private val project: ProjectVariant,
  private val dependencies: Set,
  private val graph: DependencyGraphView,
  private val declarations: Set,
  private val duplicateClasses: Set,
) {

  fun accept(visitor: GraphViewVisitor) {
    val context = DefaultContext(project, dependencies, graph, declarations, duplicateClasses)
    dependencies.forEach { dependency ->
      visitor.visit(dependency, context)
    }
  }
}

internal class DefaultContext(
  override val project: ProjectVariant,
  override val dependencies: Set,
  override val graph: DependencyGraphView,
  override val declarations: Set,
  override val duplicateClasses: Set,
) : GraphViewVisitor.Context




© 2015 - 2025 Weber Informatics LLC | Privacy Policy