Ideas on how to improve TwiP

  • Use a ServiceLoader to find the subclasses of ParameterHandler. There must be only one for a type, but adding a subclass overloads the superclass, so a parameter handler can be refined or replaced, but it never can be ambiguous as to which one to use.
  • Allow the assumption to be the name of a public static method that takes a parameter of the same type and returns a boolean indicating if a value is valid.
  • Allow non-number parameters to be assumed to be equal code==/code or inequal code!=/code to the value(s) of a constant or static method.
  • Add parameters to methods used in @Values annotations
  • Extend the Parameter class to utilize the debug data parameter name and use that as a fallback method/field name if there is no @Values and no matching AutoTwip annotation.