use of ru.vyarus.guice.persist.orient.repository.core.spi.parameter.MethodParamExtension in project guice-persist-orient by xvik.
the class ParamsService method processParameter.
@SuppressWarnings("unchecked")
private void processParameter(final ProcessingContext context, final Class<? extends RepositoryMethodDescriptor> descriptorType, final int pos, final Class<?> type, final Annotation... annotations) {
final Annotation ext = ExtUtils.findParameterExtension(annotations);
if (ext != null) {
final Class<? extends MethodParamExtension> extension = ext.annotationType().getAnnotation(MethodParam.class).value();
ExtCompatibilityUtils.checkParamExtensionCompatibility(descriptorType, extension);
if (!context.extensionMap.containsKey(extension)) {
final MethodParamExtension instance = injector.getInstance(extension);
context.extensionMap.put(extension, instance);
}
context.extParams.put(extension, new ParamInfo(ext, pos, type));
} else {
context.ordinal.add(new ParamInfo(pos, type));
}
}
Aggregations