Lines 41-47
Link Here
|
41 |
* The string buffer into which the serialized representation of the AST is |
41 |
* The string buffer into which the serialized representation of the AST is |
42 |
* written. |
42 |
* written. |
43 |
*/ |
43 |
*/ |
44 |
private StringBuffer buffer; |
44 |
protected StringBuffer buffer; |
45 |
|
45 |
|
46 |
private int indent = 0; |
46 |
private int indent = 0; |
47 |
|
47 |
|
Lines 523-529
Link Here
|
523 |
buffer.append(", "); |
523 |
buffer.append(", "); |
524 |
} |
524 |
} |
525 |
buffer.append("):"); |
525 |
buffer.append("):"); |
526 |
buffer.append(((DefaultPointcut)node.getDesignator()).getDetail()); |
526 |
node.getDesignator().accept(this); |
527 |
buffer.append(";\n"); |
527 |
buffer.append(";\n"); |
528 |
return false; |
528 |
return false; |
529 |
} |
529 |
} |
Lines 1646-1649
Link Here
|
1646 |
return false; |
1646 |
return false; |
1647 |
} |
1647 |
} |
1648 |
|
1648 |
|
|
|
1649 |
public boolean visit(DeclareParentsDeclaration node) { |
1650 |
printIndent(); |
1651 |
this.buffer.append("declare parents: "); |
1652 |
node.getChildTypePattern().accept(this); |
1653 |
|
1654 |
if(node.isExtends()){ |
1655 |
this.buffer.append(" extends "); |
1656 |
} else { |
1657 |
this.buffer.append(" implements "); |
1658 |
} |
1659 |
|
1660 |
for (Iterator it = node.parentTypePatterns().iterator(); it.hasNext();) { |
1661 |
TypePattern typePat = (TypePattern) it.next(); |
1662 |
typePat.accept(this); |
1663 |
if(it.hasNext()){ |
1664 |
this.buffer.append(", "); |
1665 |
} |
1666 |
} |
1667 |
|
1668 |
this.buffer.append(";\n"); |
1669 |
|
1670 |
return false; |
1671 |
} |
1672 |
|
1673 |
public boolean visit(DeclareWarningDeclaration node) { |
1674 |
printIndent(); |
1675 |
|
1676 |
this.buffer.append("declare warning: "); |
1677 |
node.getPointcut().accept(this); |
1678 |
this.buffer.append(" : "); |
1679 |
node.getMessage().accept(this); |
1680 |
this.buffer.append(" ;\n"); |
1681 |
return false; |
1682 |
} |
1683 |
|
1684 |
public boolean visit(DeclareErrorDeclaration node) { |
1685 |
printIndent(); |
1686 |
|
1687 |
this.buffer.append("declare error: "); |
1688 |
node.getPointcut().accept(this); |
1689 |
this.buffer.append(" : "); |
1690 |
node.getMessage().accept(this); |
1691 |
this.buffer.append(" ;\n"); |
1692 |
return false; |
1693 |
} |
1694 |
|
1695 |
public boolean visit(DeclareSoftDeclaration node) { |
1696 |
printIndent(); |
1697 |
|
1698 |
this.buffer.append("declare soft: "); |
1699 |
node.getTypePattern().accept(this); |
1700 |
this.buffer.append(" : "); |
1701 |
node.getPointcut().accept(this); |
1702 |
this.buffer.append(" ;\n"); |
1703 |
return false; |
1704 |
} |
1705 |
|
1706 |
public boolean visit(DeclarePrecedenceDeclaration node) { |
1707 |
printIndent(); |
1708 |
|
1709 |
this.buffer.append("declare precedence: "); |
1710 |
for (Iterator it = node.typePatterns().iterator(); it.hasNext();) { |
1711 |
TypePattern typePat = (TypePattern) it.next(); |
1712 |
typePat.accept(this); |
1713 |
if(it.hasNext()){ |
1714 |
this.buffer.append(", "); |
1715 |
} |
1716 |
} |
1717 |
|
1718 |
this.buffer.append(";\n"); |
1719 |
|
1720 |
return false; |
1721 |
} |
1722 |
|
1723 |
public boolean visit(DefaultTypePattern node) { |
1724 |
this.buffer.append(node.getDetail()); |
1725 |
return false; |
1726 |
} |
1727 |
|
1728 |
public boolean visit(DefaultPointcut node) { |
1729 |
this.buffer.append(node.getDetail()); |
1730 |
return false; |
1731 |
} |
1649 |
} |
1732 |
} |