@Test void readConfigTypes() { final ConfigurationTypeParameterEnricher enricher = new ConfigurationTypeParameterEnricher(); assertEquals(new HashMap<String, String>() { { put("tcomp::configurationtype::type", "dataset"); put("tcomp::configurationtype::name", "test"); } }, enricher.onParameterAnnotation("testParam", null, new DataSet() { @Override public Class<? extends Annotation> annotationType() { return DataSet.class; } @Override public String value() { return "test"; } })); assertEquals(emptyMap(), enricher.onParameterAnnotation("testParam", null, new Override() { @Override public Class<? extends Annotation> annotationType() { return Override.class; } })); }
@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(); }
ConfigurationTypeParameterEnricher extends BaseParameterEnricher { @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(); } }
ConfigurationTypeParameterEnricher extends BaseParameterEnricher { @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(); }  }
ConfigurationTypeParameterEnricher extends BaseParameterEnricher { @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(); }  @Override Map<String, String> onParameterAnnotation(final String parameterName, final Type parameterType,
            final Annotation annotation); }
ConfigurationTypeParameterEnricher extends BaseParameterEnricher { @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(); }  @Override Map<String, String> onParameterAnnotation(final String parameterName, final Type parameterType,
            final Annotation annotation); static final String META_PREFIX; }