
net.jangaroo.extxml.util.Rule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ext-xml Show documentation
Show all versions of ext-xml Show documentation
Allows a declarative description of UI components
The newest version!
package net.jangaroo.extxml.util;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
import java.util.List;
/**
* A Rule defines a regular expression ({@link java.util.regex.Pattern}) and code to be executed
* when a line matches that pattern. The code will be invoked with the current State.
*/
public abstract class Rule {
public Rule(String pattern) {
this.pattern = Pattern.compile(pattern,0);
}
public Matcher createMatcher(String line) {
return pattern.matcher(line);
}
public abstract void matched(State state, List groups);
private Pattern pattern;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy