Package com.tngtech.archunit.core.domain
Class JavaClasses
java.lang.Object
com.tngtech.archunit.base.ForwardingCollection<JavaClass>
com.tngtech.archunit.core.domain.JavaClasses
- All Implemented Interfaces:
DescribedIterable<JavaClass>,HasDescription,CanOverrideDescription<JavaClasses>,Iterable<JavaClass>,Collection<JavaClass>
@PublicAPI(usage=ACCESS)
public final class JavaClasses
extends ForwardingCollection<JavaClass>
implements DescribedIterable<JavaClass>, CanOverrideDescription<JavaClasses>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.tngtech.archunit.base.DescribedIterable
DescribedIterable.From -
Method Summary
Modifier and TypeMethodDescriptionAllows to adjust the description of this object.booleanbooleanbooleancontainPackage(String packageName) protected Collection<JavaClass>delegate()booleangetPackage(String packageName) inthashCode()that(DescribedPredicate<? super JavaClass> predicate) toString()Methods inherited from class com.tngtech.archunit.base.ForwardingCollection
add, addAll, clear, contains, containsAll, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArrayMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, spliterator, stream, toArray
-
Method Details
-
that
- Parameters:
predicate- aDescribedPredicateto determine which classes match- Returns:
JavaClassesmatching the given predicate; the description will be adjusted according to the predicate's description
-
as
Description copied from interface:CanOverrideDescriptionAllows to adjust the description of this object. Note that this method will not modify the current object, but instead return a new object with adjusted description.- Specified by:
asin interfaceCanOverrideDescription<JavaClasses>- Parameters:
description- The description the result of this method will hold- Returns:
- A new equivalent object with adjusted description
-
getDescription
- Specified by:
getDescriptionin interfaceHasDescription
-
toString
- Overrides:
toStringin classForwardingCollection<JavaClass>
-
contain
-
get
-
contain
- Parameters:
typeName- a fully qualified name of a Java class- Returns:
- true, if a
JavaClasswith the given name is contained, false otherwise - See Also:
-
get
- Parameters:
typeName- a fully qualified name of a Java class- Returns:
- a
JavaClasswith the given name; throws an exception if there is no class with the given name - See Also:
-
containPackage
- Parameters:
packageName- name of a package, may consist of several parts, e.g.com.myapp.some.subpackage- Returns:
- true, if some package with this name is contained, false otherwise
-
getPackage
- Parameters:
packageName- name of a package, may consist of several parts, e.g.com.myapp.some.subpackage- Returns:
- the package with the given name; throws an exception if the package does not exist
- See Also:
-
getDefaultPackage
- Returns:
- the default package, i.e. the root of all packages. The default package name ist the empty string.
-
hashCode
public int hashCode()- Specified by:
hashCodein interfaceCollection<JavaClass>- Overrides:
hashCodein classForwardingCollection<JavaClass>
-
equals
- Specified by:
equalsin interfaceCollection<JavaClass>- Overrides:
equalsin classForwardingCollection<JavaClass>
-
delegate
- Specified by:
delegatein classForwardingCollection<JavaClass>
-