CharacterClassTree extends RegexTree { public RegexTree getContents() { return contents; } 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 emptyIntersectionOperands() { RegexTree regex = assertSuccessfulParse("[&&x]"); CharacterClassTree characterClass = assertType(CharacterClassTree.class, regex); CharacterClassIntersectionTree intersection = assertType(CharacterClassIntersectionTree.class, characterClass.getContents()); assertListElements(intersection.getCharacterClasses(), first -> assertListSize(0, assertType(CharacterClassUnionTree.class, first).getCharacterClasses()), second -> assertPlainCharacter('x', second) ); }