LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info
Class LyRegExp

java.lang.Object
  extended by leon.info.LyTag
      extended by leon.info.LyInfo
          extended by 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.


Nested Class Summary
 
Nested classes/interfaces inherited from class leon.info.LyTag
LyTag.Model
 
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
 
Methods inherited from interface leon.parser.LyCommentInterface
getCommentsEnd, getCommentsStart, setCommentsEnd, setCommentsStart
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
See Also:
Constant Field Values
Method Detail

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.


(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com