private VarNamePattern getValidVarNamePattern( String varNamePattern) throws IllegalArgumentException
    {
    VarNamePattern pattern = new VarNamePattern( varNamePattern);
    if( !pattern.isValid())
      {
      throw new IllegalArgumentException( "\"" + pattern + "\" is not a valid variable name pattern");
      }

    return pattern;
    }
private VarNamePattern getValidVarNamePattern ( String varNamePattern ) throws IllegalArgumentException { VarNamePattern pattern = new VarNamePattern ( varNamePattern ) ; if ( ! pattern . isValid ( ) ) { throw new IllegalArgumentException ( "\"" + pattern + "\" is not a valid variable name pattern" ) ; } return pattern ; }
Throws an exception if the given variable name pattern is not valid. Otherwise, returns
the corresponding {@link VarNamePattern} object.