Decycle uses a special pattern syntax that was inspired by Apache Ant
for matching fully qualified class names. A typical decycle pattern looks like this:
com.example.app.**
?matches exactly one name character (but not dots)*matches zero or more name characters (but not dots)**matches zero or more dots and name characters.matches only itself (the dot)|separates alternatives(and)can be used to surround sub-patterns (for example alternatives)
A name character is a character that may be used in names of Java classes,
i.e. usually letters, digits, the underscore _, and in particular the dollar symbol $.
Note: Decycle looks at the byte code and matches the class names created by the compiler.
For example, the inner interface java.util.Map.Entry becomes java.util.Map$Entry.
com.example.?oomatchescom.example.Fooandcom.example.Zoo(it doesn't matchcom.example.ooandcom.example.bar.Taboo)com.example.*matchescom.example.Fooandcom.example.Bar(it doesn't matchcom.example.bar.Foo)com.example.B*matchescom.example.B,com.example.Bar, andcom.example.Bar$Innercom.example.**matchescom.example.Fooandcom.example.bar.baz.Quxcom.example.**.Foomatchescom.example.bar.Fooandcom.example.bar.baz.Foo(however, it doesn't matchcom.example.Foo– this is different from Ant's**handling)com.example.*.**matchescom.example.bar.Fooandcom.example.bar.baz.Foo(but it doesn't matchcom.example.Foo)com.example.(bar|baz).Foomatches onlycom.example.bar.Fooandcom.example.baz.Foo
Patterns that are used for the configuration of slicings have an extended syntax.
A named pattern uses the form pattern=name. In this case the assigned
name defines the name of the slice.
An unnamed pattern should also contain one pair of curly braces (e.g. com.example.{*}.**).
The matched substring within the curly braces defines the name of the slice.