use of org.springframework.roo.model.CustomDataBuilder in project spring-roo by spring-projects.
the class MemberDetailsBuilder method tag.
public <T> void tag(final T toModify, final CustomDataKey<T> key, final Object value) {
if (toModify instanceof FieldMetadata) {
final CustomDataBuilder customDataBuilder = new CustomDataBuilder();
customDataBuilder.put(key, value);
doModification((FieldMetadata) toModify, customDataBuilder.build());
} else if (toModify instanceof MethodMetadata) {
final CustomDataBuilder customDataBuilder = new CustomDataBuilder();
customDataBuilder.put(key, value);
doModification((MethodMetadata) toModify, customDataBuilder.build());
} else if (toModify instanceof ConstructorMetadata) {
final CustomDataBuilder customDataBuilder = new CustomDataBuilder();
customDataBuilder.put(key, value);
doModification((ConstructorMetadata) toModify, customDataBuilder.build());
} else if (toModify instanceof MemberHoldingTypeDetails) {
final CustomDataBuilder customDataBuilder = new CustomDataBuilder();
customDataBuilder.put(key, value);
doModification((MemberHoldingTypeDetails) toModify, customDataBuilder.build());
}
}
Aggregations