Home
last modified time | relevance | path

Searched refs:CsmElement (Results 1 – 21 of 21) sorted by relevance

/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/
DConcreteSyntaxModel.java35 import com.github.javaparser.printer.concretesyntaxmodel.CsmElement;
44 import static com.github.javaparser.printer.concretesyntaxmodel.CsmElement.*;
53 private static final Map<Class, CsmElement> concreteSyntaxModelByClass = new HashMap<>();
56 private static CsmElement modifiers() { in modifiers()
63 private static CsmElement mix(CsmElement... elements) { in mix()
67 private static CsmElement memberAnnotations() { in memberAnnotations()
71 private static CsmElement annotations() { in annotations()
75 private static CsmElement typeParameters() { in typeParameters()
76 …list(ObservableProperty.TYPE_PARAMETERS, CsmElement.sequence(CsmElement.comma(), CsmElement.space(… in typeParameters()
77CsmElement.sequence(CsmElement.token(GeneratedJavaParserConstants.GT), CsmElement.space())); in typeParameters()
[all …]
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/concretesyntaxmodel/
DCsmElement.java35 public interface CsmElement { interface
39 static CsmElement child(ObservableProperty property) { in child()
43 static CsmElement attribute(ObservableProperty property) { in attribute()
47 static CsmElement sequence(CsmElement... elements) { in sequence()
51 static CsmElement string(int tokenType, String content) { in string()
55 static CsmElement string(int tokenType) { in string()
59 static CsmElement stringToken(ObservableProperty property) { in stringToken()
63 static CsmElement charToken(ObservableProperty property) { in charToken()
67 static CsmElement token(int tokenType) { in token()
71 static CsmElement token(int tokenType, CsmToken.TokenContentCalculator tokenContentCalculator) { in token()
[all …]
DCsmList.java33 public class CsmList implements CsmElement {
35 private final CsmElement separatorPost;
36 private final CsmElement separatorPre;
37 private final CsmElement preceeding;
38 private final CsmElement following;
44 public CsmElement getSeparatorPost() { in getSeparatorPost()
48 public CsmElement getSeparatorPre() { in getSeparatorPre()
52 public CsmElement getPreceeding() { in getPreceeding()
56 public CsmElement getFollowing() { in getFollowing()
60 public CsmList(ObservableProperty property, CsmElement separator) { in CsmList()
[all …]
DCsmConditional.java32 public class CsmConditional implements CsmElement {
35 private final CsmElement thenElement;
36 private final CsmElement elseElement;
49 public CsmElement getThenElement() { in getThenElement()
53 public CsmElement getElseElement() { in getElseElement()
82 …ditional(ObservableProperty property, Condition condition, CsmElement thenElement, CsmElement else… in CsmConditional()
89 …(List<ObservableProperty> properties, Condition condition, CsmElement thenElement, CsmElement else… in CsmConditional()
99 … public CsmConditional(ObservableProperty property, Condition condition, CsmElement thenElement) { in CsmConditional()
DCsmSequence.java30 public class CsmSequence implements CsmElement {
31 private List<CsmElement> elements;
33 public CsmSequence(List<CsmElement> elements) { in CsmSequence()
43 public List<CsmElement> getElements() { in getElements()
DCsmMix.java13 public class CsmMix implements CsmElement {
14 private List<CsmElement> elements;
16 public CsmMix(List<CsmElement> elements) { in CsmMix()
26 public List<CsmElement> getElements() { in getElements()
DCsmNone.java27 public class CsmNone implements CsmElement {
DCsmIndent.java27 public class CsmIndent implements CsmElement {
DCsmUnindent.java27 public class CsmUnindent implements CsmElement {
DCsmChar.java28 public class CsmChar implements CsmElement {
DCsmString.java28 public class CsmString implements CsmElement {
DCsmSingleReference.java29 public class CsmSingleReference implements CsmElement {
DCsmOrphanCommentsEnding.java33 public class CsmOrphanCommentsEnding implements CsmElement {
DCsmComment.java31 public class CsmComment implements CsmElement {
DCsmAttribute.java30 public class CsmAttribute implements CsmElement {
DCsmToken.java33 public class CsmToken implements CsmElement {
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/
DLexicalDifferenceCalculator.java24 final List<CsmElement> elements;
26 CalculatedSyntaxModel(List<CsmElement> elements) { in CalculatedSyntaxModel()
31 List<CsmElement> newList = new LinkedList<>(); in from()
52 static class CsmChild implements CsmElement {
91 CsmElement element = ConcreteSyntaxModel.forClass(container.getClass()); in calculateListRemovalDifference()
99 CsmElement element = ConcreteSyntaxModel.forClass(container.getClass()); in calculateListAdditionDifference()
107 CsmElement element = ConcreteSyntaxModel.forClass(container.getClass()); in calculateListReplacementDifference()
117 CsmElement element = ConcreteSyntaxModel.forClass(observedNode.getClass()); in calculatePropertyChange()
125 CalculatedSyntaxModel calculatedSyntaxModelForNode(CsmElement csm, Node node) { in calculatedSyntaxModelForNode()
126 List<CsmElement> elements = new LinkedList<>(); in calculatedSyntaxModelForNode()
[all …]
DDifference.java33 static DifferenceElement added(CsmElement element) { in added()
37 static DifferenceElement removed(CsmElement element) { in removed()
41 static DifferenceElement kept(CsmElement element) { in kept()
48 CsmElement getElement(); in getElement()
54 final CsmElement element;
56 public Added(CsmElement element) { in Added()
81 public CsmElement getElement() { in getElement()
139 final CsmElement element;
141 public Kept(CsmElement element) { in Kept()
166 public CsmElement getElement() { in getElement()
[all …]
DLexicalPreservingPrinter.java38 import com.github.javaparser.printer.concretesyntaxmodel.CsmElement;
379 private static NodeText interpret(Node node, CsmElement csm, NodeText nodeText) {
385 for (CsmElement element : calculatedSyntaxModel.elements) {
/external/javaparser/javaparser-testing/src/test/java/com/github/javaparser/printer/lexicalpreservation/
DLexicalDifferenceCalculatorTest.java18 import com.github.javaparser.printer.concretesyntaxmodel.CsmElement;
35 CsmElement element = ConcreteSyntaxModel.forClass(cu.getClass()); in compilationUnitExampleOriginal()
45 CsmElement element = ConcreteSyntaxModel.forClass(cu.getClass()); in compilationUnitExampleWithPackageSet()
58 CsmElement element = ConcreteSyntaxModel.forClass(annotationDeclaration.getClass()); in annotationDeclarationModifiersExampleOriginal()
89 CsmElement element = ConcreteSyntaxModel.forClass(annotationDeclaration.getClass()); in annotationDeclarationModifiersExampleModified()
122 CsmElement element = ConcreteSyntaxModel.forClass(annotationDeclaration.getClass()); in annotationDeclarationNameExampleModified()
155 CsmElement element = ConcreteSyntaxModel.forClass(annotationDeclaration.getClass()); in annotationDeclaratioJavadocExampleOriginal()
188 CsmElement element = ConcreteSyntaxModel.forClass(annotationDeclaration.getClass()); in annotationDeclaratioJavadocExampleAddingJavadoc()
249 …assertEquals(CsmElement.token(GeneratedJavaParserConstants.LBRACE), calculatedSyntaxModel.elements… in csmModelAfterAddingStatementToEmptyBlock()
250 assertEquals(CsmElement.newline(), calculatedSyntaxModel.elements.get(index++)); in csmModelAfterAddingStatementToEmptyBlock()
[all …]
DDifferenceTest.java16 import com.github.javaparser.printer.concretesyntaxmodel.CsmElement;
84 CsmElement element = ConcreteSyntaxModel.forClass(cu.getClass()); in compilationUnitExampleWithPackageSetDiff()
99 CsmElement element = ConcreteSyntaxModel.forClass(annotationDeclaration.getClass()); in annotationDeclarationExampleWithModifierAdded()
134 CsmElement element = ConcreteSyntaxModel.forClass(annotationDeclaration.getClass()); in annotationDeclarationExampleWithNameChanged()
170 CsmElement element = ConcreteSyntaxModel.forClass(annotationDeclaration.getClass()); in annotationDeclarationExampleWithJavadocAdded()
206 CsmElement element = ConcreteSyntaxModel.forClass(annotationDeclaration.getClass()); in annotationDeclarationExampleWithJavadocRemoved()
241 CsmElement element = ConcreteSyntaxModel.forClass(annotationDeclaration.getClass()); in annotationDeclarationExampleWithModifierRemoved()