Skip to content
Snippets Groups Projects
Commit c085995f authored by Johannes Mey's avatar Johannes Mey
Browse files

add accessors

parent de3ed8f1
No related branches found
No related tags found
No related merge requests found
aspect Navigation {
syn boolean Element.isComplex() = false;
eq ComplexElement.isComplex() = true;
syn boolean Element.isComplexElement() = false;
eq ComplexElement.isComplexElement() = true;
syn ComplexElement Element.asComplexElement() = null;
eq ComplexElement.asComplexElement() = this;
syn boolean Element.isMappingElement() = false;
eq MappingElement.isMappingElement() = true;
syn MappingElement Element.asMappingElement() = null;
eq MappingElement.asMappingElement() = this;
syn boolean Element.isListElement() = false;
eq ListElement.isListElement() = true;
syn ListElement Element.asListElement() = null;
eq ListElement.asListElement() = this;
syn boolean Element.isSimpleElement() = false;
eq SimpleElement.isSimpleElement() = true;
syn SimpleElement Element.asSimpleElement() = null;
eq SimpleElement.asSimpleElement() = this;
syn boolean Element.isEmpty() = false;
eq MappingElement.isEmpty() = getNumKeyValuePair() == 0;
......
......@@ -60,7 +60,7 @@ aspect Printing {
protected StringBuilder KeyValuePair.prettyPrint(StringBuilder sb, boolean printIndent, String indent) {
if (printIndent) sb.append(indent);
sb.append(getKey()).append(":");
if (getValue().isComplex() && !getValue().isEmpty()) {
if (getValue().isComplexElement() && !getValue().isEmpty()) {
sb.append("\n");
getValue().prettyPrint(sb, true, indent + PRINT_INDENT);
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment