Record Class ProjectionPlan

java.lang.Object
java.lang.Record
dev.archunitjava.projection.ProjectionPlan

public record ProjectionPlan(ProjectionDomain domain, List<ProjectionNodeMapping> explicitMappings, Set<DependencyKind> includedKinds, Map<DependencyKind, DependencyKind> kindRelabeling, boolean retainSelfEdges, List<ProjectionEdgeSelector> excludedEdges) extends Record
Immutable, pure projection value shared by package, type, member, classpath, and module views. Every application creates a new graph and never mutates the source graph or this plan.
  • Constructor Details

    • ProjectionPlan

      public ProjectionPlan(ProjectionDomain domain, List<ProjectionNodeMapping> explicitMappings, Set<DependencyKind> includedKinds, Map<DependencyKind, DependencyKind> kindRelabeling, boolean retainSelfEdges, List<ProjectionEdgeSelector> excludedEdges)
      Creates an instance of a ProjectionPlan record class.
      Parameters:
      domain - the value for the domain record component
      explicitMappings - the value for the explicitMappings record component
      includedKinds - the value for the includedKinds record component
      kindRelabeling - the value for the kindRelabeling record component
      retainSelfEdges - the value for the retainSelfEdges record component
      excludedEdges - the value for the excludedEdges record component
  • Method Details

    • packages

      public static ProjectionPlan packages()
    • types

      public static ProjectionPlan types()
    • members

      public static ProjectionPlan members()
    • classPath

      public static ProjectionPlan classPath(Map<? extends StableId, LocationId> mappings)
    • modules

      public static ProjectionPlan modules(Map<? extends StableId, ModuleId> mappings)
    • includingOnly

      public ProjectionPlan includingOnly(Set<DependencyKind> kinds)
    • relabeling

      public ProjectionPlan relabeling(DependencyKind source, DependencyKind target)
    • withoutSelfEdges

      public ProjectionPlan withoutSelfEdges()
    • excluding

      public ProjectionPlan excluding(StableId origin, StableId target, DependencyKind kind)
    • apply

      public ProjectionResult apply(DependencyGraph source)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • domain

      public ProjectionDomain domain()
      Returns the value of the domain record component.
      Returns:
      the value of the domain record component
    • explicitMappings

      public List<ProjectionNodeMapping> explicitMappings()
      Returns the value of the explicitMappings record component.
      Returns:
      the value of the explicitMappings record component
    • includedKinds

      public Set<DependencyKind> includedKinds()
      Returns the value of the includedKinds record component.
      Returns:
      the value of the includedKinds record component
    • kindRelabeling

      public Map<DependencyKind, DependencyKind> kindRelabeling()
      Returns the value of the kindRelabeling record component.
      Returns:
      the value of the kindRelabeling record component
    • retainSelfEdges

      public boolean retainSelfEdges()
      Returns the value of the retainSelfEdges record component.
      Returns:
      the value of the retainSelfEdges record component
    • excludedEdges

      public List<ProjectionEdgeSelector> excludedEdges()
      Returns the value of the excludedEdges record component.
      Returns:
      the value of the excludedEdges record component