Search in sources :

Example 1 with ConfigurationType

use of org.talend.sdk.component.api.configuration.type.meta.ConfigurationType in project component-runtime by Talend.

the class ConfigurationTypeParameterEnricher method onParameterAnnotation.

@Override
public Map<String, String> onParameterAnnotation(final String parameterName, final Type parameterType, final Annotation annotation) {
    final ConfigurationType configType = annotation.annotationType().getAnnotation(ConfigurationType.class);
    if (configType != null) {
        final String type = configType.value();
        final String name = getName(annotation);
        if (name != null) {
            return new HashMap<String, String>() {

                {
                    put(META_PREFIX + "type", type);
                    put(META_PREFIX + "name", name);
                }
            };
        }
    }
    return emptyMap();
}
Also used : ConfigurationType(org.talend.sdk.component.api.configuration.type.meta.ConfigurationType) HashMap(java.util.HashMap)

Aggregations

HashMap (java.util.HashMap)1 ConfigurationType (org.talend.sdk.component.api.configuration.type.meta.ConfigurationType)1