Search in sources :

Example 1 with JavaMethodReferenceBuilder

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

the class ClassGraphCreator method createMethodReferencesFor.

@Override
public Set<JavaMethodReference> createMethodReferencesFor(JavaCodeUnit codeUnit, Set<TryCatchBlockBuilder> tryCatchBlockBuilders) {
    ImmutableSet.Builder<JavaMethodReference> result = ImmutableSet.builder();
    for (AccessRecord<MethodReferenceTarget> record : processedMethodReferenceRecords.get(codeUnit)) {
        JavaMethodReference methodReference = accessBuilderFrom(new JavaMethodReferenceBuilder(), record).build();
        result.add(methodReference);
        handlePossibleTryBlockAccess(tryCatchBlockBuilders, record, methodReference);
    }
    return result.build();
}
Also used : JavaMethodReference(com.tngtech.archunit.core.domain.JavaMethodReference) ImmutableSet(com.google.common.collect.ImmutableSet) MethodReferenceTarget(com.tngtech.archunit.core.domain.AccessTarget.MethodReferenceTarget) JavaMethodReferenceBuilder(com.tngtech.archunit.core.importer.DomainBuilders.JavaMethodReferenceBuilder)

Aggregations

ImmutableSet (com.google.common.collect.ImmutableSet)1 MethodReferenceTarget (com.tngtech.archunit.core.domain.AccessTarget.MethodReferenceTarget)1 JavaMethodReference (com.tngtech.archunit.core.domain.JavaMethodReference)1 JavaMethodReferenceBuilder (com.tngtech.archunit.core.importer.DomainBuilders.JavaMethodReferenceBuilder)1