/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/ |
D | ConcreteSyntaxModel.java | 35 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() 77 … CsmElement.sequence(CsmElement.token(GeneratedJavaParserConstants.GT), CsmElement.space())); in typeParameters() [all …]
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/concretesyntaxmodel/ |
D | CsmElement.java | 35 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 …]
|
D | CsmList.java | 33 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 …]
|
D | CsmConditional.java | 32 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()
|
D | CsmSequence.java | 30 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()
|
D | CsmMix.java | 13 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()
|
D | CsmNone.java | 27 public class CsmNone implements CsmElement {
|
D | CsmIndent.java | 27 public class CsmIndent implements CsmElement {
|
D | CsmUnindent.java | 27 public class CsmUnindent implements CsmElement {
|
D | CsmChar.java | 28 public class CsmChar implements CsmElement {
|
D | CsmString.java | 28 public class CsmString implements CsmElement {
|
D | CsmSingleReference.java | 29 public class CsmSingleReference implements CsmElement {
|
D | CsmOrphanCommentsEnding.java | 33 public class CsmOrphanCommentsEnding implements CsmElement {
|
D | CsmComment.java | 31 public class CsmComment implements CsmElement {
|
D | CsmAttribute.java | 30 public class CsmAttribute implements CsmElement {
|
D | CsmToken.java | 33 public class CsmToken implements CsmElement {
|
/external/javaparser/javaparser-core/src/main/java/com/github/javaparser/printer/lexicalpreservation/ |
D | LexicalDifferenceCalculator.java | 24 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 …]
|
D | Difference.java | 33 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 …]
|
D | LexicalPreservingPrinter.java | 38 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/ |
D | LexicalDifferenceCalculatorTest.java | 18 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 …]
|
D | DifferenceTest.java | 16 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()
|