public int score(LuaValue value) { switch (value.type()) { case LuaValue.TTABLE: return value.length() == 0 ? 0 : componentCoercion.score(value.get(1)); case LuaValue.TUSERDATA: return inheritanceLevels(componentType, value.touserdata().getClass().getComponentType()); case LuaValue.TNIL: return SCORE_NULL_VALUE; default: return SCORE_UNCOERCIBLE; } }