Class JavaMatcher

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

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

      Constructors 
      Constructor Description
      JavaMatcher()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Map<java.lang.String,​java.lang.String> getResolvedVariables​(com.devonfw.cobigen.javaplugin.matcher.JavaMatcher.MatcherType matcherType, java.lang.String matcherValue, java.lang.String stringToMatch, java.util.List<com.devonfw.cobigen.api.to.VariableAssignmentTo> variableAssignments)
      Resolves all variables for this trigger
      boolean matches​(com.devonfw.cobigen.api.to.MatcherTo matcher)  
      java.util.Map<java.lang.String,​java.lang.String> resolveVariables​(com.devonfw.cobigen.api.to.MatcherTo matcher, java.util.List<com.devonfw.cobigen.api.to.VariableAssignmentTo> variableAssignments)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 java.util.Map<java.lang.String,​java.lang.String> resolveVariables​(com.devonfw.cobigen.api.to.MatcherTo matcher,
                                                                                       java.util.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 java.util.Map<java.lang.String,​java.lang.String> getResolvedVariables​(com.devonfw.cobigen.javaplugin.matcher.JavaMatcher.MatcherType matcherType,
                                                                                           java.lang.String matcherValue,
                                                                                           java.lang.String stringToMatch,
                                                                                           java.util.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