Search in sources :

Example 1 with CustomDataBuilder

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());
    }
}
Also used : ConstructorMetadata(org.springframework.roo.classpath.details.ConstructorMetadata) FieldMetadata(org.springframework.roo.classpath.details.FieldMetadata) CustomDataBuilder(org.springframework.roo.model.CustomDataBuilder) MemberHoldingTypeDetails(org.springframework.roo.classpath.details.MemberHoldingTypeDetails) MethodMetadata(org.springframework.roo.classpath.details.MethodMetadata)

Aggregations

ConstructorMetadata (org.springframework.roo.classpath.details.ConstructorMetadata)1 FieldMetadata (org.springframework.roo.classpath.details.FieldMetadata)1 MemberHoldingTypeDetails (org.springframework.roo.classpath.details.MemberHoldingTypeDetails)1 MethodMetadata (org.springframework.roo.classpath.details.MethodMetadata)1 CustomDataBuilder (org.springframework.roo.model.CustomDataBuilder)1