use of se.jbee.inject.Hint in project silk by jbee.
the class ReflectiveDescriptor method checkConsistentExplicitHints.
protected final void checkConsistentExplicitHints(Parameter[] params) {
if (explicitHints.length == 0)
return;
Type<?>[] types = arrayMap(params, Type.class, p -> actualParameterType(p, actualDeclaringType()));
Hint<?>[] hints = new Hint[params.length];
for (Hint<?> hint : explicitHints) {
int i = Hint.indexForType(types, hint, hints);
if (i < 0)
throw InconsistentDeclaration.incomprehensibleHint(hint);
hints[i] = hint;
}
}
Aggregations