Class JavaMatcher

  • All Implemented Interfaces:
    com.devonfw.cobigen.api.extension.MatcherInterpreter

    public class JavaMatcher
    extends Object
    implements com.devonfw.cobigen.api.extension.MatcherInterpreter
    Matcher implementation for the Java Plugin
    • Constructor Detail

      • JavaMatcher

        public JavaMatcher()
    • Method Detail

      • matches

        public boolean matches​(com.devonfw.cobigen.api.to.MatcherTo matcher)
        Specified by:
        matches in interface com.devonfw.cobigen.api.extension.MatcherInterpreter
      • resolveVariables

        public Map<String,​String> resolveVariables​(com.devonfw.cobigen.api.to.MatcherTo matcher,
                                                         List<com.devonfw.cobigen.api.to.VariableAssignmentTo> variableAssignments)
                                                  throws com.devonfw.cobigen.api.exception.InvalidConfigurationException
        Specified by:
        resolveVariables in interface com.devonfw.cobigen.api.extension.MatcherInterpreter
        Throws:
        com.devonfw.cobigen.api.exception.InvalidConfigurationException
      • getResolvedVariables

        public Map<String,​String> getResolvedVariables​(com.devonfw.cobigen.javaplugin.matcher.JavaMatcher.MatcherType matcherType,
                                                             String matcherValue,
                                                             String stringToMatch,
                                                             List<com.devonfw.cobigen.api.to.VariableAssignmentTo> variableAssignments)
                                                      throws com.devonfw.cobigen.api.exception.InvalidConfigurationException
        Resolves all variables for this trigger
        Parameters:
        matcherType - matcher type
        matcherValue - matcher value
        stringToMatch - String to match
        variableAssignments - variable assigments to be resolved
        Returns:
        a Map from variable name to the resolved value
        Throws:
        com.devonfw.cobigen.api.exception.InvalidConfigurationException - if some of the matcher type and variable type combinations are not supported