Package org.archifacts.core.descriptor
Interface SourceBasedArtifactRelationshipDescriptor
-
- All Superinterfaces:
ArtifactRelationshipDescriptor
public interface SourceBasedArtifactRelationshipDescriptor extends ArtifactRelationshipDescriptor
Describes anArtifactRelationship. As it is source-based the relationship's source side is the artifact which is able to provide all the information to build theArtifactRelationship.- Author:
- Oliver Libutzki
- See Also:
ArtifactRelationship
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisSource(Artifact sourceCandidateArtifact)Evaluates if the givenArtifactis the source of the describedArtifactRelationship.Stream<com.tngtech.archunit.core.domain.JavaClass>targets(com.tngtech.archunit.core.domain.JavaClass sourceClass)For everyArtifactwhich is considered to be a relationship source byisSource(Artifact), this method is called by passingArtifact.getJavaClass().-
Methods inherited from interface org.archifacts.core.descriptor.ArtifactRelationshipDescriptor
role
-
-
-
-
Method Detail
-
isSource
boolean isSource(Artifact sourceCandidateArtifact)
Evaluates if the givenArtifactis the source of the describedArtifactRelationship.- Parameters:
sourceCandidateArtifact- TheArtifactto be evaluated- Returns:
- true, if the given
Artifactis the source of the describedArtifactRelationship, otherwise false.
-
targets
Stream<com.tngtech.archunit.core.domain.JavaClass> targets(com.tngtech.archunit.core.domain.JavaClass sourceClass)
For everyArtifactwhich is considered to be a relationship source byisSource(Artifact), this method is called by passingArtifact.getJavaClass(). Returns all the targets. For each target aArtifactRelationshipis built.- Parameters:
sourceClass- theJavaClassof theArtifactfor whichisSource(Artifact)returned true.- Returns:
- all the targets from the given
JavaClasswhich are described by this descriptor.
-
-