leon.info
Class LyRegExp
java.lang.Object
leon.info.LyTag
leon.info.LyInfo
leon.info.LyRegExp
- All Implemented Interfaces:
- java.lang.Cloneable, LyCommentInterface
public class LyRegExp
- extends LyInfo
This class defines a regular expression associated to a text.
Field Summary |
static java.lang.String |
__VERSION
|
Method Summary |
static java.util.regex.Pattern |
getPattern(java.lang.String format)
Gets the pattern of the given format. |
java.lang.String |
getValue()
Gets value of the regexp. |
static boolean |
matchFormat(LyEnvironment environment,
java.lang.String format,
java.lang.String value)
Tests if a string match a regular expression. |
Methods inherited from class leon.info.LyInfo |
getAlias, getApplication, getFile, getId, getInclude, getName, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, setApplication, setFile, toString |
Methods inherited from class leon.info.LyTag |
clone, getCommentsEnd, getCommentsStart, getEnvironment, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
__VERSION
public static final java.lang.String __VERSION
- See Also:
- Constant Field Values
matchFormat
public static boolean matchFormat(LyEnvironment environment,
java.lang.String format,
java.lang.String value)
- Tests if a string match a regular expression.
- Parameters:
environment
- Environment where the test occured.format
- The regular expression.value
- The string that must be match the regula expression.
- Returns:
- true if the given string match the regular expression, false otherwise.
getPattern
public static java.util.regex.Pattern getPattern(java.lang.String format)
throws java.util.regex.PatternSyntaxException
- Gets the pattern of the given format.
- Parameters:
format
- the format to analyse
- Returns:
- the found pattern into the given format
- Throws:
java.util.regex.PatternSyntaxException
- if the patter of the format is not well formed
getValue
public final java.lang.String getValue()
- Gets value of the regexp.
Website: W4 S.A., contact us: support@w4global.com