test_class.file: core/src/test/java/org/gatein/management/core/api/PathElementTest.java
test_class.identifier: PathElementTest
test_case.body: @Test
     public void testBadTemplateExpression()
     {
        try
        {
           PathElement.pathElement("{bad *}");
           fail();
        }
        catch (PatternSyntaxException e)
        {
        }
  
        try
        {
           PathElement.pathElement("{foo: *}/something/{bad: {{{}");
           fail();
        }
        catch (PatternSyntaxException e)
        {
        }
     }
test_case.class_method_signature: PathElementTest.testBadTemplateExpression()
test_case.full_signature: @Test public void testBadTemplateExpression()
test_case.identifier: testBadTemplateExpression
test_case.invocations: pathElement fail pathElement fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testBadTemplateExpression()
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 static PathElement pathElement(String path) throws PatternSyntaxException
     {
        // logic based off resteasy for path templating
        String replacedCurlySegment = replaceEnclosedCurlyBraces(path);
        String[] split = TEMPLATE_PARAM_PATTERN.split(replacedCurlySegment);
        Matcher withPathParam = TEMPLATE_PARAM_PATTERN.matcher(replacedCurlySegment);
  
        int i = 0;
        StringBuilder buffer = new StringBuilder();
        if (i < split.length) buffer.append(split[i++]);
  
        int groupNumber = 1;
        List<Group> groups = new ArrayList<Group>();
        while (withPathParam.find())
        {
           String name = withPathParam.group(1);
           buffer.append("(");
           if (withPathParam.group(3) == null)
           {
              buffer.append(TEMPLATE_PARAM_DEFAULT_REGEX);
              groups.add(new Group(name, groupNumber++));
           }
           else
           {
              String expr = withPathParam.group(3);
              expr = recoverEnclosedCurlyBraces(expr);
              buffer.append(expr);
              groups.add(new Group(name, groupNumber++));
              groupNumber += groupCount(expr);
           }
           buffer.append(")");
           if (i < split.length) buffer.append(split[i++]);
        }
  
        return new PathElement(path, groups, buffer.toString());
     }
focal_method.class_method_signature: PathElement.pathElement(String path)
focal_method.full_signature: public static PathElement pathElement(String path)
focal_method.identifier: pathElement
focal_method.invocations: replaceEnclosedCurlyBraces split matcher append find group append group append add group recoverEnclosedCurlyBraces append add groupCount append append toString
focal_method.modifiers: public static
focal_method.parameters: (String path)
focal_method.return: PathElement
focal_method.signature: PathElement pathElement(String path)