public abstract class AbstractDelegateSlice extends Object implements Slice
| Constructor and Description |
|---|
AbstractDelegateSlice() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
contains(Clazz entry)
Check whether a class belongs to a slice.
|
Slice |
dependencyClosure(Slice within)
Calculates the transitive closure of this slice's classes and their dependencies
intersected with the within slice.
|
Set<Clazz> |
getClazzes()
Returns all classes belonging to this slice.
|
protected abstract Slice |
getDelegate() |
ConcreteSlice |
getDependencies()
Returns a slice of all the dependencies of this slice.
|
Slice |
minus(Iterable<? extends Slice> slices)
Creates a new slice that resembles the difference of this slice and the
slices passed.
|
Slice |
minus(Predicate<Clazz> predicate)
This is a convenience method for
this.minus(this.slice(predicate)). |
Slice |
minus(Slice... slices)
Creates a new slice that resembles the difference of this slice and the
slices passed.
|
Slice |
minus(String pattern)
This is a convenience method for
this.minus(this.slice(pattern)). |
Slice |
named(String name)
Creates a new
Slice from this slice for which the
Object.toString() returns name. |
SortedMap<String,PartitionSlice> |
partitionBy(SlicePartitioner partitioner)
Partitions the slice by some
SlicePartitioner that maps classes to names. |
<S extends PartitionSlice> |
partitionBy(SlicePartitioner partitioner,
PartitionSliceFactory<S> partitionSliceFactory)
Same as
Slice.partitionBy(SlicePartitioner), but creates specialized subclasses
of PartitionSlice using a PartitionSliceFactory. |
SortedMap<String,PackageSlice> |
partitionByPackage()
Partitions the slice by package.
|
Slice |
plus(Iterable<? extends Slice> slices)
Creates a new slices as union from this slice and the slices passed.
|
Slice |
plus(Slice... slices)
Creates a new slices as union from this slice and the slices passed.
|
Slice |
slice(Iterable<? extends Slice> slices)
Creates a new slice that resembles the intersection of this slice and union of the
slices passed.
|
Slice |
slice(Predicate<Clazz> predicate)
Creates a new slices of all classes of this slide that fulfill the specified
name predicate.
|
Slice |
slice(Slice... slices)
Creates a new slice that resembles the intersection of this slice and the
slices passed.
|
Slice |
slice(String pattern)
Creates a new slices of all classes of this slide that match the specified
name pattern.
|
boolean |
uses(Slice other)
Check whether there is a dependency to some other slice.
|
protected abstract Slice getDelegate()
public Slice plus(Iterable<? extends Slice> slices)
Slicepublic Slice plus(Slice... slices)
Slicepublic Slice minus(Iterable<? extends Slice> slices)
Slicepublic Slice minus(Slice... slices)
Slicepublic Slice minus(String pattern)
Slicethis.minus(this.slice(pattern)).public Slice minus(Predicate<Clazz> predicate)
Slicethis.minus(this.slice(predicate)).public Slice slice(Iterable<? extends Slice> slices)
Slicepublic Slice slice(Slice... slices)
Slicepublic Slice slice(String pattern)
Slicepublic Slice slice(Predicate<Clazz> predicate)
Sliceslice in interface Slicepredicate - the predicatefor predefined predicatespublic Slice dependencyClosure(Slice within)
SlicedependencyClosure in interface Slicewithin - the slice within which the transitive closure is calculatedpublic boolean contains(Clazz entry)
Slicepublic Set<Clazz> getClazzes()
SliceClasspath. A slice derived from some pattern or Predicate
will throw a ResolveException instead.getClazzes in interface Slicepublic ConcreteSlice getDependencies()
SlicegetDependencies in interface Slicepublic boolean uses(Slice other)
Slicepublic SortedMap<String,PackageSlice> partitionByPackage()
SlicepartitionByPackage in interface Slicepublic SortedMap<String,PartitionSlice> partitionBy(SlicePartitioner partitioner)
SliceSlicePartitioner that maps classes to names.
Clazzes the partitioner does not map to a name will be omitted form the result.partitionBy in interface Slicepartitioner - the SlicePartitioner to partition byfor predefined partitionerspublic <S extends PartitionSlice> SortedMap<String,S> partitionBy(SlicePartitioner partitioner, PartitionSliceFactory<S> partitionSliceFactory)
SliceSlice.partitionBy(SlicePartitioner), but creates specialized subclasses
of PartitionSlice using a PartitionSliceFactory.partitionBy in interface SliceS - the type of slices returnedpartitioner - the SlicePartitioner to partition bypartitionSliceFactory - the factory to create the slicesCopyright © 2017–2025 Hans Jörg Heßmann. All rights reserved.