Class PatternMatchingCategorizer

  • All Implemented Interfaces:
    Categorizer, java.util.function.Function<Node,​java.util.Set<Node>>

    public class PatternMatchingCategorizer
    extends java.lang.Object
    implements Categorizer
    Categorizes package nodes by matching them against ant like patterns.
    • * matches a node with any name not containing dots
    • letters and dots match those letters and dots respectively
    • ** matches any combination of letters and dots

    The category of a matched node is that part of the match that is wrapped in parenthesis.

    If no parenthesis are give the full name is returned as a category.

    Examples:

    • de.**.test matches de..test, de.some.test and de.some.other.test
    • de.*.test matches from the examples given above only de.some.test
    • de.(*.test) categorizes de.some.test as 'some.test'
    • de.(*).test categorizes it as 'some'
    • Constructor Summary

      Constructors 
      Constructor Description
      PatternMatchingCategorizer​(java.lang.String sliceType, java.lang.String pattern)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Set<Node> apply​(Node node)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.function.Function

        andThen, compose
    • Constructor Detail

      • PatternMatchingCategorizer

        public PatternMatchingCategorizer​(java.lang.String sliceType,
                                          java.lang.String pattern)
    • Method Detail

      • apply

        public java.util.Set<Node> apply​(Node node)
        Specified by:
        apply in interface java.util.function.Function<Node,​java.util.Set<Node>>