Class Types

java.lang.Object
org.springframework.modulith.core.Types

public class Types extends Object
Utility to deal with a variety of types.
Author:
Oliver Drotbohm
  • Constructor Details

    • Types

      public Types()
  • Method Details

    • loadIfPresent

      @Nullable public static <T> Class<T> loadIfPresent(String name)
      Loads the class with the given name if present on the classpath.
      Type Parameters:
      T - the type to be loaded
      Parameters:
      name - the fully-qualified name of the type to be loaded, must not be null or empty.
      Returns:
      can be null.
    • residesInPackageAnnotatedWith

      static com.tngtech.archunit.base.DescribedPredicate<com.tngtech.archunit.core.domain.JavaClass> residesInPackageAnnotatedWith(Class<? extends Annotation> type)
      Creates a new DescribedPredicate to match classes
      Parameters:
      type - must not be null.
      Returns:
      will never be null.
      Since:
      1.2