Class Classes

java.lang.Object
org.springframework.modulith.core.Classes
All Implemented Interfaces:
com.tngtech.archunit.base.DescribedIterable<com.tngtech.archunit.core.domain.JavaClass>, com.tngtech.archunit.base.HasDescription, Iterable<com.tngtech.archunit.core.domain.JavaClass>

class Classes extends Object implements com.tngtech.archunit.base.DescribedIterable<com.tngtech.archunit.core.domain.JavaClass>
Author:
Oliver Drotbohm
  • Nested Class Summary

    Nested classes/interfaces inherited from interface com.tngtech.archunit.base.DescribedIterable

    com.tngtech.archunit.base.DescribedIterable.From
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static Classes
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) Classes
    and(Collection<com.tngtech.archunit.core.domain.JavaClass> others)
    Returns a Classes with the current elements and the given other ones combined.
    (package private) Classes
    and(Classes classes)
     
    (package private) boolean
    contains(com.tngtech.archunit.core.domain.JavaClass type)
     
    (package private) boolean
    contains(String className)
     
    boolean
     
    (package private) String
     
    (package private) static String
    format(com.tngtech.archunit.core.domain.JavaClass type, String basePackage)
     
    (package private) static String
    format(com.tngtech.archunit.core.domain.JavaClass type, String basePackage, boolean exposed)
    Formats the given JavaClass into a String, potentially abbreviating the given base package.
    (package private) String
    format(String basePackage)
     
     
    (package private) com.tngtech.archunit.core.domain.JavaClass
     
    int
     
    (package private) boolean
     
    Iterator<com.tngtech.archunit.core.domain.JavaClass>
     
    (package private) static Classes
    of(com.tngtech.archunit.core.domain.JavaClasses classes)
    Creates a new Classes for the given JavaClasses.
    (package private) static Classes
    of(List<com.tngtech.archunit.core.domain.JavaClass> classes)
    Creates a new Classes for the given JavaClasses.
    Stream<com.tngtech.archunit.core.domain.JavaClass>
     
    (package private) Classes
    that(com.tngtech.archunit.base.DescribedPredicate<? super com.tngtech.archunit.core.domain.JavaClass> predicate)
    Returns Classes that match the given DescribedPredicate.
    (package private) static Collector<com.tngtech.archunit.core.domain.JavaClass,?,Classes>
    Returns a Collector creating a Classes instance from a Stream of JavaType.
    (package private) Optional<com.tngtech.archunit.core.domain.JavaClass>
     
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator
  • Field Details

    • NONE

      public static Classes NONE
  • Method Details

    • of

      static Classes of(com.tngtech.archunit.core.domain.JavaClasses classes)
      Creates a new Classes for the given JavaClasses.
      Parameters:
      classes - must not be null.
      Returns:
    • of

      static Classes of(List<com.tngtech.archunit.core.domain.JavaClass> classes)
      Creates a new Classes for the given JavaClasses.
      Parameters:
      classes - must not be null.
      Returns:
      will never be null.
    • toClasses

      static Collector<com.tngtech.archunit.core.domain.JavaClass,?,Classes> toClasses()
      Returns a Collector creating a Classes instance from a Stream of JavaType.
      Returns:
      will never be null.
    • that

      Classes that(com.tngtech.archunit.base.DescribedPredicate<? super com.tngtech.archunit.core.domain.JavaClass> predicate)
      Returns Classes that match the given DescribedPredicate.
      Parameters:
      predicate - must not be null.
      Returns:
    • and

      Classes and(Classes classes)
    • and

      Classes and(Collection<com.tngtech.archunit.core.domain.JavaClass> others)
      Returns a Classes with the current elements and the given other ones combined.
      Parameters:
      others - must not be null.
      Returns:
    • stream

      public Stream<com.tngtech.archunit.core.domain.JavaClass> stream()
    • isEmpty

      boolean isEmpty()
    • toOptional

      Optional<com.tngtech.archunit.core.domain.JavaClass> toOptional()
    • contains

      boolean contains(com.tngtech.archunit.core.domain.JavaClass type)
    • contains

      boolean contains(String className)
    • getRequiredClass

      com.tngtech.archunit.core.domain.JavaClass getRequiredClass(Class<?> type)
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface com.tngtech.archunit.base.HasDescription
    • iterator

      public Iterator<com.tngtech.archunit.core.domain.JavaClass> iterator()
      Specified by:
      iterator in interface Iterable<com.tngtech.archunit.core.domain.JavaClass>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • format

      String format()
    • format

      String format(String basePackage)
    • format

      static String format(com.tngtech.archunit.core.domain.JavaClass type, String basePackage)
    • format

      static String format(com.tngtech.archunit.core.domain.JavaClass type, String basePackage, boolean exposed)
      Formats the given JavaClass into a String, potentially abbreviating the given base package.
      Parameters:
      type - must not be null.
      basePackage - must not be null.
      exposed - whether the given type is considered exposed or not.
      Returns:
      will never be null.