Uses of Class
com.github.javaparser.printer.lexicalpreservation.TextElement
Packages that use TextElement
Package
Description
-
Uses of TextElement in com.github.javaparser.printer.concretesyntaxmodel
Methods in com.github.javaparser.printer.concretesyntaxmodel with parameters of type TextElementModifier and TypeMethodDescriptiondefault booleanCsmElement.isCorrespondingElement(TextElement textElement) booleanCsmIndent.isCorrespondingElement(TextElement textElement) booleanCsmToken.isCorrespondingElement(TextElement textElement) -
Uses of TextElement in com.github.javaparser.printer.lexicalpreservation
Subclasses of TextElement in com.github.javaparser.printer.lexicalpreservationModifier and TypeClassDescriptionclassRepresent the position of a child node in the NodeText of its parent.classClasses in com.github.javaparser.printer.lexicalpreservation that implement interfaces with type arguments of type TextElementModifier and TypeClassDescriptionclassIterator that tracks its current position in a TextElement list.Methods in com.github.javaparser.printer.lexicalpreservation that return TextElementModifier and TypeMethodDescriptionTextElementList.get(int index) TextElementSequence.get(int index) Returns the element at the specified index.TextElementIterator.next()TextElementIterator.previous()Added.toTextElement()Methods in com.github.javaparser.printer.lexicalpreservation that return types with arguments of type TextElementModifier and TypeMethodDescriptionstatic List<TextElement> IndentationCalculator.computeFromPrecedingElements(List<TextElement> precedingElements) Computes the indentation that should be used based on the elements preceding the current position.static List<TextElement> IndentationCalculator.createIndentationBlock()Creates a single indentation block of STANDARD_INDENTATION_SIZE spaces.static List<TextElement> IndentationCalculator.extractIndentationFromTokens(List<TextElement> precedingTokens) Extracts the indentation portion from a list of elements.IndentationContext.getCurrent()Returns a copy of the current indentation elements.default Stream<TextElement> TextElementSequence.stream()Returns a stream of elements for functional operations.TextElementList.subList(int fromIndex, int toIndex) TextElementSequence.subList(int fromIndex, int toIndex) Returns a sublist view [fromIndex, toIndex).TextElementList.takeWhile(Predicate<TextElement> predicate) TextElementSequence.takeWhile(Predicate<TextElement> predicate) Returns a new list containing elements from the start until the predicate fails.TextElementList.toList()TextElementSequence.toList()Returns an unmodifiable view of the underlying list.TextElementList.toMutableList()TextElementSequence.toMutableList()Returns the underlying mutable list.Methods in com.github.javaparser.printer.lexicalpreservation with parameters of type TextElementModifier and TypeMethodDescriptionvoidTextElementIterator.add(TextElement element) default intTextElementSequence.indexOf(int fromIndex, TextElement element) Finds the next occurrence of element starting from fromIndex (inclusive).default intTextElementSequence.indexOf(TextElement element) Finds the first occurrence of the specified element.voidTextElementList.insert(int index, TextElement element) voidTextElementSequence.insert(int index, TextElement element) Inserts element at the specified index.default intTextElementSequence.lastIndexOf(int fromIndex, TextElement element) Finds the previous occurrence of element before fromIndex (inclusive).default intTextElementSequence.lastIndexOf(TextElement element) Finds the last occurrence of the specified element.booleanTextElement.match(TextElement textElement) booleanTextElementMatcher.match(TextElement textElement) static TextElementListTextElementList.of(TextElement... elements) Creates a new TextElementList containing the given elements.voidTextElementIterator.set(TextElement element) Method parameters in com.github.javaparser.printer.lexicalpreservation with type arguments of type TextElementModifier and TypeMethodDescriptionbooleanTextElementList.allMatch(Predicate<TextElement> predicate) booleanTextElementSequence.allMatch(Predicate<TextElement> predicate) Tests whether all elements in this sequence match the given predicate.booleanTextElementList.anyMatch(Predicate<TextElement> predicate) booleanTextElementSequence.anyMatch(Predicate<TextElement> predicate) Tests whether any element in this sequence matches the given predicate.static List<TextElement> IndentationCalculator.computeFromPrecedingElements(List<TextElement> precedingElements) Computes the indentation that should be used based on the elements preceding the current position.static TextElementListTextElementList.copyOf(List<TextElement> elements) Creates a new TextElementList with a copy of the given list.static List<TextElement> IndentationCalculator.extractIndentationFromTokens(List<TextElement> precedingTokens) Extracts the indentation portion from a list of elements.intTextElementList.findFirst(Predicate<TextElement> predicate) intTextElementSequence.findFirst(Predicate<TextElement> predicate) Finds the first index where the predicate matches, searching forward from index 0.intTextElementList.findLast(Predicate<TextElement> predicate) intTextElementSequence.findLast(Predicate<TextElement> predicate) Finds the last index where the predicate matches, searching backward from the end.intTextElementList.findNext(int fromIndex, Predicate<TextElement> predicate) intTextElementSequence.findNext(int fromIndex, Predicate<TextElement> predicate) Finds the next index where the predicate matches, searching forward from fromIndex (inclusive).intTextElementList.findPrevious(int fromIndex, Predicate<TextElement> predicate) intTextElementSequence.findPrevious(int fromIndex, Predicate<TextElement> predicate) Finds the previous index where the predicate matches, searching backward from fromIndex (inclusive).voidTextElementList.insertAll(int index, List<TextElement> elementsToInsert) voidTextElementSequence.insertAll(int index, List<TextElement> elements) Inserts all elements at the specified index.booleanTextElementList.noneMatch(Predicate<TextElement> predicate) booleanTextElementSequence.noneMatch(Predicate<TextElement> predicate) Tests whether no elements in this sequence match the given predicate.static TextElementListTextElementList.of(List<TextElement> elements) Creates a new TextElementList wrapping the given list.voidIndentationContext.set(List<TextElement> newIndentation) Replaces the current indentation with the specified elements.TextElementList.takeWhile(Predicate<TextElement> predicate) TextElementSequence.takeWhile(Predicate<TextElement> predicate) Returns a new list containing elements from the start until the predicate fails.Constructor parameters in com.github.javaparser.printer.lexicalpreservation with type arguments of type TextElementModifierConstructorDescriptionIndentationContext(List<TextElement> initialIndentation) Creates a new IndentationContext with the specified initial indentation.TextElementIterator(List<TextElement> elements, int fromIndex) Creates an iterator starting at the specified index.TextElementList(List<TextElement> elements) Creates a wrapper around the given list.