Search in sources :

Example 1 with FieldAccessRecord

use of com.tngtech.archunit.core.importer.AccessRecord.FieldAccessRecord in project ArchUnit by TNG.

the class ClassGraphCreator method createFieldAccessesFor.

@Override
public Set<JavaFieldAccess> createFieldAccessesFor(JavaCodeUnit codeUnit, Set<TryCatchBlockBuilder> tryCatchBlockBuilders) {
    ImmutableSet.Builder<JavaFieldAccess> result = ImmutableSet.builder();
    for (FieldAccessRecord record : processedFieldAccessRecords.get(codeUnit)) {
        JavaFieldAccess access = accessBuilderFrom(new JavaFieldAccessBuilder(), record).withAccessType(record.getAccessType()).build();
        result.add(access);
        handlePossibleTryBlockAccess(tryCatchBlockBuilders, record, access);
    }
    return result.build();
}
Also used : JavaFieldAccess(com.tngtech.archunit.core.domain.JavaFieldAccess) ImmutableSet(com.google.common.collect.ImmutableSet) FieldAccessRecord(com.tngtech.archunit.core.importer.AccessRecord.FieldAccessRecord) JavaFieldAccessBuilder(com.tngtech.archunit.core.importer.DomainBuilders.JavaFieldAccessBuilder)

Aggregations

ImmutableSet (com.google.common.collect.ImmutableSet)1 JavaFieldAccess (com.tngtech.archunit.core.domain.JavaFieldAccess)1 FieldAccessRecord (com.tngtech.archunit.core.importer.AccessRecord.FieldAccessRecord)1 JavaFieldAccessBuilder (com.tngtech.archunit.core.importer.DomainBuilders.JavaFieldAccessBuilder)1