Class ParameterType<T>

    • Method Detail

      • getName

        public String getName()
        This is used in the type name in typed expressions
        Returns:
        human readable type name
      • getType

        public Type getType()
        Returns the type of the parameter type - typically the type the transform transforms to. This can be used in conjunction with GeneratedExpression (snippets) to generate snippets for statically typed languages. Not used for anything else.
        Returns:
        the type of the parameter type
      • preferForRegexpMatch

        public boolean preferForRegexpMatch()
        Indicates whether or not this is a preferential parameter type when matching text against a RegularExpression. In case there are multiple parameter types with a regexp identical to the capture group's regexp, a preferential parameter type will win. If there are more than 1 preferential ones, an error will be thrown.
        Returns:
        true if this is a preferential type
      • useForSnippets

        public boolean useForSnippets()
        Indicates whether or not this is a parameter type should be used for generating GeneratedExpressions from text. Typically, parameter types with greedy regexps should return false.
        Returns:
        true is this parameter type is used for expression generation
      • useRegexpMatchAsStrongTypeHint

        public boolean useRegexpMatchAsStrongTypeHint()
        Indicates whether or not this parameter provides a strong type hint when considering a regular expression match. If so, the type hint provided by the method arguments will be ignored. If not, when both type hints are in agreement, this parameter types transformer will be used. Otherwise parameter transformation for a regular expression match will be handled by ParameterTypeRegistry.getDefaultParameterTransformer().
        Returns:
        true if this parameter type provides a type hint when considering a regular expression match
      • weight

        public int weight()