use of com.tngtech.archunit.core.importer.DomainBuilders.JavaTypeCreationProcess in project ArchUnit by TNG.
the class JavaClassProcessor method visitField.
@Override
public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {
if (importAborted()) {
return super.visitField(access, name, desc, signature, value);
}
JavaClassDescriptor rawType = JavaClassDescriptorImporter.importAsmTypeFromDescriptor(desc);
Optional<JavaTypeCreationProcess<JavaField>> genericType = JavaFieldTypeSignatureImporter.parseAsmFieldTypeSignature(signature, declarationHandler);
DomainBuilders.JavaFieldBuilder fieldBuilder = new DomainBuilders.JavaFieldBuilder().withName(name).withType(genericType, rawType).withModifiers(JavaModifier.getModifiersForField(access)).withDescriptor(desc);
declarationHandler.onDeclaredField(fieldBuilder, rawType.getFullyQualifiedClassName());
return new FieldProcessor(fieldBuilder, declarationHandler);
}
Aggregations