/** Returns the parameters in this group. */ @SuppressWarnings("fallthrough") public List<GeneralParameterDescriptor> descriptors() { if (asList == null) { if (parameters == null) { asList = Collections.emptyList(); } else switch (parameters.length) { case 0: asList = Collections.emptyList(); break; case 1: asList = Collections.singletonList(parameters[0]); break; case 2: // fall through case 3: asList = UnmodifiableArrayList.wrap(parameters); break; default: asList = new AsList(parameters); break; } } return asList; }