/** * <copyright> * </copyright> * * */ package ssl.resource.ssl.mopp; public class SslSyntaxElementDecorator { /** * the syntax element to be decorated */ private ssl.resource.ssl.grammar.SslSyntaxElement decoratedElement; /** * an array of child decorators (one decorator per child of the decorated syntax * element */ private SslSyntaxElementDecorator[] childDecorators; /** * a list of the indices that must be printed */ private java.util.List<Integer> indicesToPrint = new java.util.ArrayList<Integer>(); public SslSyntaxElementDecorator(ssl.resource.ssl.grammar.SslSyntaxElement decoratedElement, SslSyntaxElementDecorator[] childDecorators) { super(); this.decoratedElement = decoratedElement; this.childDecorators = childDecorators; } public void addIndexToPrint(Integer index) { indicesToPrint.add(index); } public ssl.resource.ssl.grammar.SslSyntaxElement getDecoratedElement() { return decoratedElement; } public SslSyntaxElementDecorator[] getChildDecorators() { return childDecorators; } public Integer getNextIndexToPrint() { if (indicesToPrint.size() == 0) { return null; } return indicesToPrint.remove(0); } public String toString() { return "" + getDecoratedElement(); } }