CharacterClassTree extends RegexTree { public JavaCharacter getOpeningBracket() { return openingBracket; } CharacterClassTree(RegexSource source, IndexRange range, JavaCharacter openingBracket, boolean negated, RegexTree contents); RegexTree getContents(); boolean isNegated(); JavaCharacter getOpeningBracket(); @Override void accept(RegexVisitor visitor); @Override Kind kind();  }
@Test void simpleCharacterClass() { RegexTree regex = assertSuccessfulParse("[a-z]"); assertCharacterRange('a', 'z', assertCharacterClass(false, regex)); assertJavaCharacter(0, '[', ((CharacterClassTree)regex).getOpeningBracket()); }