test_class.file: core/src/test/java/org/gatein/management/core/api/PathElementTest.java
test_class.identifier: PathElementTest
test_case.body: @Test
     public void testMatches() throws ParseException
     {
        assertTrue(PathElement.pathElement("{path}").matches("foo"));
        assertTrue(PathElement.pathElement("{path}bar").matches("foo-foobar"));
  
        assertTrue(PathElement.pathElement("{path: .*}").matches("foo/bar"));
        assertTrue(PathElement.pathElement("{path: .*}/bar").matches("foo/foo-bar/bar"));
        assertFalse(PathElement.pathElement("{path: .*}/bar").matches("foo/foo-bar/"));
  
        assertTrue(PathElement.pathElement("{alphapath: [a-zA-Z]{3}}/{numpath: [0-9]*}").matches("foo/123"));
        assertFalse(PathElement.pathElement("{alphapath: [a-zA-Z]{3}}/{numpath: [0-9]*}").matches("foobar/123"));
        assertFalse(PathElement.pathElement("{alphapath: [a-zA-Z]{3}}/{numpath: [0-9]*}").matches("foo/a123"));
  
        assertTrue(PathElement.pathElement("{weird: \\{foo\\}\\/\\{bar\\}}").matches("{foo}/{bar}"));
        assertFalse(PathElement.pathElement("{weird: \\{foo\\}\\/\\{bar\\}}").matches("foo/bar"));
  
        assertTrue(PathElement.pathElement("foo/{required}/{optional: .*}").matches("foo/bar/"));
        assertFalse(PathElement.pathElement("foo/{bar}/{required}").matches("foo/bar"));
     }
test_case.class_method_signature: PathElementTest.testMatches()
test_case.full_signature: @Test public void testMatches()
test_case.identifier: testMatches
test_case.invocations: assertTrue matches pathElement assertTrue matches pathElement assertTrue matches pathElement assertTrue matches pathElement assertFalse matches pathElement assertTrue matches pathElement assertFalse matches pathElement assertFalse matches pathElement assertTrue matches pathElement assertFalse matches pathElement assertTrue matches pathElement assertFalse matches pathElement
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testMatches()
focal_class.declarator: TEMPLATE_NAME_REGEX = "\\w[\\w\\.-]*"
focal_class.modifier: private static final
focal_class.original_string: private static final String TEMPLATE_NAME_REGEX = "\\w[\\w\\.-]*";
focal_class.type: String
focal_class.var_name: TEMPLATE_NAME_REGEX
focal_class.declarator: TEMPLATE_PARAM_REGEX_REGEX = "[^{}][^{}]*"
focal_class.modifier: private static final
focal_class.original_string: private static final String TEMPLATE_PARAM_REGEX_REGEX = "[^{}][^{}]*";
focal_class.type: String
focal_class.var_name: TEMPLATE_PARAM_REGEX_REGEX
focal_class.declarator: TEMPLATE_PARAM_REGEX = "\\{\\s*(" + TEMPLATE_NAME_REGEX + ")\\s*(:\\s*(" + TEMPLATE_PARAM_REGEX_REGEX + "))?\\}"
focal_class.modifier: private static final
focal_class.original_string: private static final String TEMPLATE_PARAM_REGEX = "\\{\\s*(" + TEMPLATE_NAME_REGEX + ")\\s*(:\\s*(" + TEMPLATE_PARAM_REGEX_REGEX + "))?\\}";
focal_class.type: String
focal_class.var_name: TEMPLATE_PARAM_REGEX
focal_class.declarator: TEMPLATE_PARAM_PATTERN = Pattern.compile(TEMPLATE_PARAM_REGEX)
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern TEMPLATE_PARAM_PATTERN = Pattern.compile(TEMPLATE_PARAM_REGEX);
focal_class.type: Pattern
focal_class.var_name: TEMPLATE_PARAM_PATTERN
focal_class.declarator: TEMPLATE_PARAM_DEFAULT_REGEX = "[^/]+"
focal_class.modifier: private static final
focal_class.original_string: private static final String TEMPLATE_PARAM_DEFAULT_REGEX = "[^/]+";
focal_class.type: String
focal_class.var_name: TEMPLATE_PARAM_DEFAULT_REGEX
focal_class.declarator: value
focal_class.modifier: private final
focal_class.original_string: private final String value;
focal_class.type: String
focal_class.var_name: value
focal_class.declarator: groups
focal_class.modifier: private final
focal_class.original_string: private final List<Group> groups;
focal_class.type: List<Group>
focal_class.var_name: groups
focal_class.declarator: regex
focal_class.modifier: private final
focal_class.original_string: private final String regex;
focal_class.type: String
focal_class.var_name: regex
focal_class.declarator: pattern
focal_class.modifier: private final
focal_class.original_string: private final Pattern pattern;
focal_class.type: Pattern
focal_class.var_name: pattern
focal_class.declarator: GROUP = Pattern.compile("[^\\\\]\\(")
focal_class.modifier: private static final
focal_class.original_string: private static final Pattern GROUP = Pattern.compile("[^\\\\]\\(");
focal_class.type: Pattern
focal_class.var_name: GROUP
focal_class.declarator: openCurlyReplacement = 6
focal_class.modifier: private static final
focal_class.original_string: private static final char openCurlyReplacement = 6;
focal_class.type: char
focal_class.var_name: openCurlyReplacement
focal_class.declarator: closeCurlyReplacement = 7
focal_class.modifier: private static final
focal_class.original_string: private static final char closeCurlyReplacement = 7;
focal_class.type: char
focal_class.var_name: closeCurlyReplacement
focal_class.file: core/src/main/java/org/gatein/management/core/api/PathElement.java
focal_class.identifier: PathElement
focal_class.class_method_signature: PathElement.pathElement(String path)
focal_class.full_signature: public static PathElement pathElement(String path)
focal_class.identifier: pathElement
focal_class.modifiers: public static
focal_class.parameters: (String path)
focal_class.return: PathElement
focal_class.signature: PathElement pathElement(String path)
focal_class.class_method_signature: PathElement.PathElement(String value, List<Group> groups, String regex)
focal_class.full_signature: public  PathElement(String value, List<Group> groups, String regex)
focal_class.identifier: PathElement
focal_class.modifiers: public
focal_class.parameters: (String value, List<Group> groups, String regex)
focal_class.signature:  PathElement(String value, List<Group> groups, String regex)
focal_class.class_method_signature: PathElement.getValue()
focal_class.full_signature: public String getValue()
focal_class.identifier: getValue
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getValue()
focal_class.class_method_signature: PathElement.isTemplate()
focal_class.full_signature: public boolean isTemplate()
focal_class.identifier: isTemplate
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isTemplate()
focal_class.class_method_signature: PathElement.matches(String path)
focal_class.full_signature: public boolean matches(String path)
focal_class.identifier: matches
focal_class.modifiers: public
focal_class.parameters: (String path)
focal_class.return: boolean
focal_class.signature: boolean matches(String path)
focal_class.class_method_signature: PathElement.resolve(String name, String path)
focal_class.full_signature: public String resolve(String name, String path)
focal_class.identifier: resolve
focal_class.modifiers: public
focal_class.parameters: (String name, String path)
focal_class.return: String
focal_class.signature: String resolve(String name, String path)
focal_class.class_method_signature: PathElement.groupCount(String regex)
focal_class.full_signature: private static int groupCount(String regex)
focal_class.identifier: groupCount
focal_class.modifiers: private static
focal_class.parameters: (String regex)
focal_class.return: int
focal_class.signature: int groupCount(String regex)
focal_class.class_method_signature: PathElement.replaceEnclosedCurlyBraces(String str)
focal_class.full_signature: private static String replaceEnclosedCurlyBraces(String str)
focal_class.identifier: replaceEnclosedCurlyBraces
focal_class.modifiers: private static
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String replaceEnclosedCurlyBraces(String str)
focal_class.class_method_signature: PathElement.recoverEnclosedCurlyBraces(String str)
focal_class.full_signature: private static String recoverEnclosedCurlyBraces(String str)
focal_class.identifier: recoverEnclosedCurlyBraces
focal_class.modifiers: private static
focal_class.parameters: (String str)
focal_class.return: String
focal_class.signature: String recoverEnclosedCurlyBraces(String str)
focal_method.body: public boolean matches(String path)
     {
        int start = 0;
        if (path.charAt(0) == '/') start++;
  
        Matcher matcher = pattern.matcher(path);
        matcher.region(start, path.length());
        return matcher.matches();
     }
focal_method.class_method_signature: PathElement.matches(String path)
focal_method.full_signature: public boolean matches(String path)
focal_method.identifier: matches
focal_method.invocations: charAt matcher region length matches
focal_method.modifiers: public
focal_method.parameters: (String path)
focal_method.return: boolean
focal_method.signature: boolean matches(String path)