Class FormatableType
java.lang.Object
org.springframework.modulith.core.FormatableType
Wrapper around
JavaClass
that allows creating additional formatted names.- Author:
- Oliver Drotbohm
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Formats the givenJavaClass
es by rendering a comma-separated list with the abbreviated class names.Returns the abbreviated (i.e.Returns the abbreviated full name of the type abbreviating only the part of the givenApplicationModule
's base package.Returns the type's full name.static FormatableType
of
(com.tngtech.archunit.core.domain.JavaClass type) Creates a newFormatableType
for the givenJavaClass
.static FormatableType
Creates a newFormatableType
for the givenClass
.
-
Method Details
-
of
Creates a newFormatableType
for the givenJavaClass
.- Parameters:
type
- must not be null.- Returns:
- will never be null.
-
of
Creates a newFormatableType
for the givenClass
.- Parameters:
type
- must not be null.- Returns:
- will never be null.
-
format
Formats the givenJavaClass
es by rendering a comma-separated list with the abbreviated class names.- Parameters:
types
- must not be null.- Returns:
- will never be null.
-
getAbbreviatedFullName
Returns the abbreviated (i.e. every package fragment reduced to its first character) full name, e.g.com.acme.MyType
will result inc.a.MyType
.- Returns:
- will never be null.
-
getAbbreviatedFullName
Returns the abbreviated full name of the type abbreviating only the part of the givenApplicationModule
's base package.- Parameters:
module
- can be null.- Returns:
- will never be null.
-
getFullName
Returns the type's full name.- Returns:
- will never be null.
-