Package org.archifacts.core.descriptor
Interface TargetBasedArtifactRelationshipDescriptor
-
- All Superinterfaces:
ArtifactRelationshipDescriptor
public interface TargetBasedArtifactRelationshipDescriptor extends ArtifactRelationshipDescriptor
Describes anArtifactRelationship. As it is target-based the relationship's target 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 booleanisTarget(Artifact targetCandidateArtifact)Evaluates if the givenArtifactis the target of the describedArtifactRelationship.Stream<com.tngtech.archunit.core.domain.JavaClass>sources(com.tngtech.archunit.core.domain.JavaClass targetClass)For everyArtifactwhich is considered to be a relationship source byisTarget(Artifact), this method is called by passingArtifact.getJavaClass().-
Methods inherited from interface org.archifacts.core.descriptor.ArtifactRelationshipDescriptor
role
-
-
-
-
Method Detail
-
isTarget
boolean isTarget(Artifact targetCandidateArtifact)
Evaluates if the givenArtifactis the target of the describedArtifactRelationship.- Parameters:
targetCandidateArtifact- TheArtifactto be evaluated- Returns:
- true, if the given
Artifactis the target of the describedArtifactRelationship, otherwise false.
-
sources
Stream<com.tngtech.archunit.core.domain.JavaClass> sources(com.tngtech.archunit.core.domain.JavaClass targetClass)
For everyArtifactwhich is considered to be a relationship source byisTarget(Artifact), this method is called by passingArtifact.getJavaClass(). Returns all the sources. For each source aArtifactRelationshipis built.- Parameters:
targetClass- theJavaClassof theArtifactfor whichisTarget(Artifact)returned true.- Returns:
- all the sources for the given
JavaClasswhich are described by this descriptor.
-
-