Class Configuration


  • public class Configuration
    extends Object
    Central configuration class for using the Decycle API. A full configuration check would look like this
         List<Constraint.Violation> violations = Configuration.builder()
                 .classpath("...") // required
                 .including(...)
                 .excluding(...)
                 .ignoring(...)
                 .slicings(...)
                 .constraints(...)
                 .report(...)
                 .reportResourcesPrefix(...)
                 .reportTitle(...)
                 .minifyReport(...)
                 .build()
                 .check();
     
    However, typically use cases don't need all settings. The minimal configuration is
         List<Constraint.Violation> violations = Configuration.builder()
                 .classpath("...")
                 .build()
                 .check();
     
    and will return all package cycles in the given classpath.
    • Method Detail

      • check

        public List<Constraint.Violation> check()
        Perform a check of the classes in the given classpath against the configured constraints and writes a report if requested.
        Returns:
        the list of all detected constraint violations (empty if no violations have been detected).
      • toString

        public String toString()
        Overrides:
        toString in class Object
        Returns:
        a string representation of this configuration