Class Slice

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Slice as​(java.lang.String pattern)
      The pattern can be a description with references to the matching groups by '$' and position.
      protected java.util.Set<JavaClass> delegate()  
      java.util.Set<Dependency> getDependencies()  
      java.lang.String getDescription()  
      java.lang.String getNamePart​(int index)
      Returns a matching part of this slice.
      java.lang.String toString()  
      • Methods inherited from interface java.util.Collection

        parallelStream, removeIf, stream
      • Methods inherited from class com.google.common.collect.ForwardingCollection

        add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, standardAddAll, standardClear, standardContains, standardContainsAll, standardIsEmpty, standardRemove, standardRetainAll, standardToArray, standardToArray, standardToString, toArray, toArray
      • Methods inherited from class com.google.common.collect.ForwardingSet

        equals, hashCode, standardEquals, standardHashCode, standardRemoveAll
      • Methods inherited from interface java.lang.Iterable

        forEach
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.util.Set

        add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, spliterator, toArray, toArray
    • Method Detail

      • delegate

        protected java.util.Set<JavaClass> delegate()
        Specified by:
        delegate in class com.google.common.collect.ForwardingSet<JavaClass>
      • as

        public Slice as​(java.lang.String pattern)
        The pattern can be a description with references to the matching groups by '$' and position. E.g. slices are created by 'some.svc.(*).sub.(*)', and the pattern is "the module $2 of service $1", and we match 'some.svc.foo.module.bar', then the resulting description will be "the module bar of service foo".
        Specified by:
        as in interface CanOverrideDescription<Slice>
        Parameters:
        pattern - The description pattern with numbered references of the form $i
        Returns:
        Same slice with different description
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class com.google.common.collect.ForwardingObject
      • getNamePart

        @PublicAPI(usage=ACCESS)
        public java.lang.String getNamePart​(int index)
        Returns a matching part of this slice. E.g. if the slice was created by matching '..(*).controller.(*)..', against 'some.other.controller.here.more', then name part '1' would be 'other' and name part '2' would be 'here'.
        Parameters:
        index - The index of the matched group
        Returns:
        The part of the matched package name.