Search in sources :

Example 1 with JavaConstructorReferenceBuilder

use of com.tngtech.archunit.core.importer.DomainBuilders.JavaConstructorReferenceBuilder in project ArchUnit by TNG.

the class ClassGraphCreator method createConstructorReferencesFor.

@Override
public Set<JavaConstructorReference> createConstructorReferencesFor(JavaCodeUnit codeUnit, Set<TryCatchBlockBuilder> tryCatchBlockBuilders) {
    ImmutableSet.Builder<JavaConstructorReference> result = ImmutableSet.builder();
    for (AccessRecord<ConstructorReferenceTarget> record : processedConstructorReferenceRecords.get(codeUnit)) {
        JavaConstructorReference constructorReference = accessBuilderFrom(new JavaConstructorReferenceBuilder(), record).build();
        result.add(constructorReference);
        handlePossibleTryBlockAccess(tryCatchBlockBuilders, record, constructorReference);
    }
    return result.build();
}
Also used : JavaConstructorReference(com.tngtech.archunit.core.domain.JavaConstructorReference) ImmutableSet(com.google.common.collect.ImmutableSet) ConstructorReferenceTarget(com.tngtech.archunit.core.domain.AccessTarget.ConstructorReferenceTarget) JavaConstructorReferenceBuilder(com.tngtech.archunit.core.importer.DomainBuilders.JavaConstructorReferenceBuilder)

Aggregations

ImmutableSet (com.google.common.collect.ImmutableSet)1 ConstructorReferenceTarget (com.tngtech.archunit.core.domain.AccessTarget.ConstructorReferenceTarget)1 JavaConstructorReference (com.tngtech.archunit.core.domain.JavaConstructorReference)1 JavaConstructorReferenceBuilder (com.tngtech.archunit.core.importer.DomainBuilders.JavaConstructorReferenceBuilder)1