The common pattern of taking a class-file entity, obtaining a corresponding builder, examining each element of the entity and possibly replacing it
with other elements can be expressed by transforms. Using the transformClass
method in that case instead of build
removes
all that boilerplate and makes the intent clearer.