Search in sources :

Example 1 with Type

use of se.jbee.lang.Type 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;
    }
}
Also used : Type.actualParameterType(se.jbee.lang.Type.actualParameterType) Type(se.jbee.lang.Type) Hint(se.jbee.inject.Hint) Hint(se.jbee.inject.Hint)

Aggregations

Hint (se.jbee.inject.Hint)1 Type (se.jbee.lang.Type)1 Type.actualParameterType (se.jbee.lang.Type.actualParameterType)1