keycloak
静的公開メンバ関数 | 静的公開変数類 | 全メンバ一覧
org.keycloak.common.util.PathHelper クラス
org.keycloak.common.util.PathHelper 連携図
Collaboration graph

静的公開メンバ関数

static String replaceEnclosedCurlyBraces (String str)
 
static String recoverEnclosedCurlyBraces (String str)
 

静的公開変数類

static final String URI_PARAM_NAME_REGEX = "\\w[\\w\\.-]*"
 
static final String URI_PARAM_REGEX_REGEX = "[^{}][^{}]*"
 
static final String URI_PARAM_REGEX = "\\{\\s*(" + URI_PARAM_NAME_REGEX + ")\\s*(:\\s*(" + URI_PARAM_REGEX_REGEX + "))?\\}"
 
static final Pattern URI_PARAM_PATTERN = Pattern.compile(URI_PARAM_REGEX)
 
static final Pattern URI_TEMPLATE_PATTERN = Pattern.compile("(\\{([^}]+)\\})")
 
static final char openCurlyReplacement = 6
 
static final char closeCurlyReplacement = 7
 

詳解

A utility class for handling URI template parameters. As the Java regulare expressions package does not handle named groups, this class attempts to simulate that functionality by using groups.

著者
Ryan J. McDonough
Bill Burke
から
1.0 Nov 8, 2006

関数詳解

◆ recoverEnclosedCurlyBraces()

static String org.keycloak.common.util.PathHelper.recoverEnclosedCurlyBraces ( String  str)
inlinestatic
72  {
73  return str.replace(openCurlyReplacement, '{').replace(closeCurlyReplacement, '}');
74  }
static final char openCurlyReplacement
Definition: PathHelper.java:45
static final char closeCurlyReplacement
Definition: PathHelper.java:46

◆ replaceEnclosedCurlyBraces()

static String org.keycloak.common.util.PathHelper.replaceEnclosedCurlyBraces ( String  str)
inlinestatic
49  {
50  char[] chars = str.toCharArray();
51  int open = 0;
52  for (int i = 0; i < chars.length; i++)
53  {
54  if (chars[i] == '{')
55  {
56  if (open != 0) chars[i] = openCurlyReplacement;
57  open++;
58  }
59  else if (chars[i] == '}')
60  {
61  open--;
62  if (open != 0)
63  {
64  chars[i] = closeCurlyReplacement;
65  }
66  }
67  }
68  return new String(chars);
69  }
static final char openCurlyReplacement
Definition: PathHelper.java:45
static final char closeCurlyReplacement
Definition: PathHelper.java:46

メンバ詳解

◆ closeCurlyReplacement

final char org.keycloak.common.util.PathHelper.closeCurlyReplacement = 7
static

◆ openCurlyReplacement

final char org.keycloak.common.util.PathHelper.openCurlyReplacement = 6
static

◆ URI_PARAM_NAME_REGEX

final String org.keycloak.common.util.PathHelper.URI_PARAM_NAME_REGEX = "\\w[\\w\\.-]*"
static

◆ URI_PARAM_PATTERN

final Pattern org.keycloak.common.util.PathHelper.URI_PARAM_PATTERN = Pattern.compile(URI_PARAM_REGEX)
static

◆ URI_PARAM_REGEX

final String org.keycloak.common.util.PathHelper.URI_PARAM_REGEX = "\\{\\s*(" + URI_PARAM_NAME_REGEX + ")\\s*(:\\s*(" + URI_PARAM_REGEX_REGEX + "))?\\}"
static

◆ URI_PARAM_REGEX_REGEX

final String org.keycloak.common.util.PathHelper.URI_PARAM_REGEX_REGEX = "[^{}][^{}]*"
static

◆ URI_TEMPLATE_PATTERN

final Pattern org.keycloak.common.util.PathHelper.URI_TEMPLATE_PATTERN = Pattern.compile("(\\{([^}]+)\\})")
static

A regex pattern that searches for a URI template parameter in the form of {*}


このクラス詳解は次のファイルから抽出されました: