Class FormatableType

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

public class FormatableType extends Object
Wrapper around JavaClass that allows creating additional formatted names.
Author:
Oliver Drotbohm
  • Method Details

    • of

      public static FormatableType of(com.tngtech.archunit.core.domain.JavaClass type)
      Creates a new FormatableType for the given JavaClass.
      Parameters:
      type - must not be null.
      Returns:
      will never be null.
    • of

      public static FormatableType of(Class<?> type)
      Creates a new FormatableType for the given Class.
      Parameters:
      type - must not be null.
      Returns:
      will never be null.
    • getAbbreviatedFullName

      public String getAbbreviatedFullName()
      Returns the abbreviated (i.e. every package fragment reduced to its first character) full name, e.g. com.acme.MyType will result in c.a.MyType.
      Returns:
      will never be null.
    • getAbbreviatedFullName

      public String getAbbreviatedFullName(@Nullable ApplicationModule module)
      Returns the abbreviated full name of the type abbreviating only the part of the given ApplicationModule's base package.
      Parameters:
      module - can be null.
      Returns:
      will never be null.
    • getFullName

      public String getFullName()
      Returns the type's full name.
      Returns:
      will never be null.