Class Reflective


  • public final class Reflective
    extends Object
    • Constructor Detail

      • Reflective

        public Reflective()
    • Method Detail

      • coerce

        public static Object coerce​(CommandSession session,
                                    Class<?> type,
                                    Object arg,
                                    int[] convert)
        converts given argument to specified type and increments convert[0] if any conversion was needed.
        Parameters:
        convert - convert[0] is incremented according to the conversion needed, to allow the "best" conversion to be determined.
        Returns:
        converted arg or NO_MATCH if no conversion possible.