Search in sources :

Example 1 with JavaConstructorCallBuilder

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

the class ClassGraphCreator method createConstructorCallsFor.

@Override
public Set<JavaConstructorCall> createConstructorCallsFor(JavaCodeUnit codeUnit, Set<TryCatchBlockBuilder> tryCatchBlockBuilders) {
    ImmutableSet.Builder<JavaConstructorCall> result = ImmutableSet.builder();
    for (AccessRecord<ConstructorCallTarget> record : processedConstructorCallRecords.get(codeUnit)) {
        JavaConstructorCall call = accessBuilderFrom(new JavaConstructorCallBuilder(), record).build();
        result.add(call);
        handlePossibleTryBlockAccess(tryCatchBlockBuilders, record, call);
    }
    return result.build();
}
Also used : ImmutableSet(com.google.common.collect.ImmutableSet) JavaConstructorCallBuilder(com.tngtech.archunit.core.importer.DomainBuilders.JavaConstructorCallBuilder) ConstructorCallTarget(com.tngtech.archunit.core.domain.AccessTarget.ConstructorCallTarget) JavaConstructorCall(com.tngtech.archunit.core.domain.JavaConstructorCall)

Aggregations

ImmutableSet (com.google.common.collect.ImmutableSet)1 ConstructorCallTarget (com.tngtech.archunit.core.domain.AccessTarget.ConstructorCallTarget)1 JavaConstructorCall (com.tngtech.archunit.core.domain.JavaConstructorCall)1 JavaConstructorCallBuilder (com.tngtech.archunit.core.importer.DomainBuilders.JavaConstructorCallBuilder)1