Changeset 1347

Show
Ignore:
Timestamp:
07/03/09 09:08:00 (14 months ago)
Author:
bruno
Message:

Remove the BlockStep? class. It was not performing any function, at most it was documenting which steps are part of TemplateBlocks?.

Location:
trunk/universe/kauri-template/src
Files:
1 removed
29 modified

Legend:

Unmodified
Added
Removed
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/AttributeBlock.java

    r487 r1347  
    4747        this.elFacade = elFacade; 
    4848        this.attributes = saxElement.getAttributes(); 
    49         this.startStep = new StartStep(this, locator); 
     49        this.startStep = new StartStep(locator); 
    5050    } 
    5151 
    52     public BlockStep getStartStep() { 
     52    public Step getStartStep() { 
    5353        return startStep; 
    5454    } 
    5555 
    56     public BlockStep getEndStep() { 
     56    public Step getEndStep() { 
    5757        if (endStep == null) 
    58             endStep = new EndStep(this, locator); 
     58            endStep = new EndStep(locator); 
    5959 
    6060        return endStep; 
    6161    } 
    6262 
    63     class StartStep extends BlockStep { 
     63    class StartStep extends Step { 
    6464 
    6565        // attribute stuff 
     
    7171        // runtimeNext may be endStep.compiledNext 
    7272 
    73         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    74             super(templateBlock, locator); 
     73        public StartStep(Locator locator) { 
     74            super(locator); 
    7575            name = attributes.getValue(NAME); 
    7676            String expression = attributes.getValue(VALUE); 
     
    9898    } 
    9999 
    100     class EndStep extends BlockStep { 
     100    class EndStep extends Step { 
    101101 
    102102        // compiledNext: first following instruction after block 
    103103        // runtimeNext idem 
    104104 
    105         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    106             super(templateBlock, locator); 
     105        public EndStep(Locator locator) { 
     106            super(locator); 
    107107        } 
    108108 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/CallMacroBlock.java

    r1346 r1347  
    3434    public CallMacroBlock(Locator locator, SaxElement saxElement) { 
    3535        super(locator, saxElement); 
    36         this.startStep = new StartStep(this, locator); 
     36        this.startStep = new StartStep(locator); 
    3737    } 
    3838 
    39     public BlockStep getStartStep() { 
     39    public Step getStartStep() { 
    4040        return startStep; 
    4141    } 
    4242 
    43     public BlockStep getEndStep() { 
     43    public Step getEndStep() { 
    4444        if (endStep == null) 
    45             endStep = new EndStep(this, locator); 
     45            endStep = new EndStep(locator); 
    4646 
    4747        return endStep; 
    4848    } 
    4949 
    50     class StartStep extends BlockStep { 
     50    class StartStep extends Step { 
    5151 
    5252        // compiledNext: first following instruction 
    5353        // runtimeNext idem 
    5454 
    55         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    56             super(templateBlock, locator); 
     55        public StartStep(Locator locator) { 
     56            super(locator); 
    5757        } 
    5858 
     
    6565    } 
    6666 
    67     class EndStep extends BlockStep { 
     67    class EndStep extends Step { 
    6868 
    6969        // compiledNext: first following instruction after block 
    7070        // runtimeNext is the startstep.next of the called macro 
    7171 
    72         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    73             super(templateBlock, locator); 
     72        public EndStep(Locator locator) { 
     73            super(locator); 
    7474        } 
    7575 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/ChooseBlock.java

    r171 r1347  
    3232        super(locator, saxElement); 
    3333        this.attributes = saxElement.getAttributes(); 
    34         this.startStep = new StartStep(this, locator); 
     34        this.startStep = new StartStep(locator); 
    3535    } 
    3636 
    37     public BlockStep getStartStep() { 
     37    public Step getStartStep() { 
    3838        return startStep; 
    3939    } 
    4040 
    41     public BlockStep getEndStep() { 
     41    public Step getEndStep() { 
    4242        if (endStep == null) 
    43             endStep = new EndStep(this, locator); 
     43            endStep = new EndStep(locator); 
    4444 
    4545        return endStep; 
    4646    } 
    4747 
    48     class StartStep extends BlockStep { 
     48    class StartStep extends Step { 
    4949 
    5050        // compiledNext: first nested instruction 
    5151        // runtimeNext idem 
    5252 
    53         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    54             super(templateBlock, locator); 
     53        public StartStep(Locator locator) { 
     54            super(locator); 
    5555        } 
    5656    } 
    5757 
    58     class EndStep extends BlockStep { 
     58    class EndStep extends Step { 
    5959 
    6060        // compiledNext: first following instruction after block 
    6161        // runtimeNext idem 
    6262 
    63         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    64             super(templateBlock, locator); 
     63        public EndStep(Locator locator) { 
     64            super(locator); 
    6565        } 
    6666 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/CommentBlock.java

    r1346 r1347  
    4343        super(locator, saxElement); 
    4444        this.elFacade = elFacade; 
    45         this.startStep = new StartStep(this, locator); 
     45        this.startStep = new StartStep(locator); 
    4646    } 
    4747 
    48     public BlockStep getStartStep() { 
     48    public Step getStartStep() { 
    4949        return startStep; 
    5050    } 
    5151 
    52     public BlockStep getEndStep() { 
     52    public Step getEndStep() { 
    5353        if (endStep == null) 
    54             endStep = new EndStep(this, locator); 
     54            endStep = new EndStep(locator); 
    5555 
    5656        return endStep; 
    5757    } 
    5858 
    59     class StartStep extends BlockStep { 
     59    class StartStep extends Step { 
    6060 
    6161        // compiledNext: first following instruction 
    6262        // runtimeNext is endStep.compiledNext 
    6363 
    64         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    65             super(templateBlock, locator); 
     64        public StartStep(Locator locator) { 
     65            super(locator); 
    6666        } 
    6767 
     
    9191    } 
    9292 
    93     class EndStep extends BlockStep { 
     93    class EndStep extends Step { 
    9494 
    9595        // compiledNext: first following instruction after block 
    9696        // runtimeNext idem 
    9797 
    98         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    99             super(templateBlock, locator); 
     98        public EndStep(Locator locator) { 
     99            super(locator); 
    100100        } 
    101101 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/CompiledTemplate.java

    r841 r1347  
    2525 * Representation of a compiled template by referencing its first "step". 
    2626 */ 
    27 public class CompiledTemplate extends BlockStep { 
     27public class CompiledTemplate extends Step { 
    2828    private String location; 
    2929    private Validity validity; 
     
    3232    private List<InitBlock> extendList; 
    3333 
    34     public CompiledTemplate(TemplateBlock templateBlock, Locator locator) { 
    35         super(templateBlock, locator); 
     34    public CompiledTemplate(Locator locator) { 
     35        super(locator); 
    3636    } 
    3737 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/DefaultTemplateBuilder.java

    r1346 r1347  
    6161    protected StringBuffer charBuffer;// buffer for characters events 
    6262    protected Locator charLocator; // keep also pointer to char location 
    63     // TODO: (bug) namespace declarations on KTL directives might be ignored (issue #37) 
    6463    protected NamespaceSupport namespaceSupport; 
    6564    /** 
     
    7271    protected DocumentBlock docblock; 
    7372    protected PrefixMappingFilterBlock prefixMappingFilterBlock; 
    74     protected BlockStep startStep; 
    75     protected BlockStep endStep; 
     73    protected Step startStep; 
     74    protected Step endStep; 
    7675    protected Step last; 
    7776 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/DocumentBlock.java

    r909 r1347  
    3030    public DocumentBlock(Locator locator) { 
    3131        super(locator); 
    32         this.startStep = new StartStep(this, locator); 
     32        this.startStep = new StartStep(locator); 
    3333    } 
    3434 
    35     public BlockStep getStartStep() { 
     35    public Step getStartStep() { 
    3636        return startStep; 
    3737    } 
    3838 
    39     public BlockStep getEndStep() { 
     39    public Step getEndStep() { 
    4040        if (endStep == null) 
    41             endStep = new EndStep(this, locator); 
     41            endStep = new EndStep(locator); 
    4242 
    4343        return endStep; 
     
    5050    class StartStep extends CompiledTemplate { 
    5151 
    52         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    53             super(templateBlock, locator); 
     52        public StartStep(Locator locator) { 
     53            super(locator); 
    5454        } 
    5555 
     
    8484    } 
    8585 
    86     class EndStep extends BlockStep { 
     86    class EndStep extends Step { 
    8787 
    88         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    89             super(templateBlock, locator); 
     88        public EndStep(Locator locator) { 
     89            super(locator); 
    9090        } 
    9191 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/ElementBlock.java

    r1346 r1347  
    4646        this.elFacade = elFacade; 
    4747        this.attributes = saxElement.getAttributes(); 
    48         this.startStep = new StartStep(this, locator); 
    49         this.endStep = new EndStep(this, locator); 
     48        this.startStep = new StartStep(locator); 
     49        this.endStep = new EndStep(locator); 
    5050    } 
    5151 
    52     public BlockStep getStartStep() { 
     52    public Step getStartStep() { 
    5353        return startStep; 
    5454    } 
    5555 
    56     public BlockStep getEndStep() { 
     56    public Step getEndStep() { 
    5757        return endStep; 
    5858    } 
    5959 
    60     class StartStep extends BlockStep { 
     60    class StartStep extends Step { 
    6161        private Expression nameExpression; 
    6262 
    63         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    64             super(templateBlock, locator); 
     63        public StartStep(Locator locator) { 
     64            super(locator); 
    6565            String name = attributes.getValue(NAME); 
    6666 
     
    8989    } 
    9090 
    91     class EndStep extends BlockStep { 
    92         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    93             super(templateBlock, locator); 
     91    class EndStep extends Step { 
     92        public EndStep(Locator locator) { 
     93            super(locator); 
    9494        } 
    9595 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/ForEachBlock.java

    r1346 r1347  
    5353        this.elFacade = elFacade; 
    5454        this.attributes = saxElement.getAttributes(); 
    55         this.startStep = new StartStep(this, locator); 
    56     } 
    57  
    58     public BlockStep getStartStep() { 
     55        this.startStep = new StartStep(locator); 
     56    } 
     57 
     58    public Step getStartStep() { 
    5959        return startStep; 
    6060    } 
    6161 
    62     public BlockStep getEndStep() { 
     62    public Step getEndStep() { 
    6363        if (endStep == null) 
    64             endStep = new EndStep(this, locator); 
     64            endStep = new EndStep(locator); 
    6565 
    6666        return endStep; 
    6767    } 
    6868 
    69     class StartStep extends BlockStep { 
     69    class StartStep extends Step { 
    7070 
    7171        // foreach stuff 
     
    7979        // runtimeNext may be endStep.compiledNext 
    8080 
    81         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    82             super(templateBlock, locator); 
     81        public StartStep(Locator locator) { 
     82            super(locator); 
    8383            String begin = attributes.getValue(BEGIN); 
    8484            String end = attributes.getValue(END); 
     
    183183    } 
    184184 
    185     class EndStep extends BlockStep { 
     185    class EndStep extends Step { 
    186186 
    187187        // compiledNext: first following instruction after block 
    188188        // runtimeNext may be startStep.compiledNext 
    189189 
    190         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    191             super(templateBlock, locator); 
     190        public EndStep(Locator locator) { 
     191            super(locator); 
    192192        } 
    193193 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/I18nBundleSwitchBlock.java

    r1020 r1347  
    2525 
    2626    public I18nBundleSwitchBlock(String i18nBundleName) { 
    27         this.startStep = new StartStep(this, locator); 
     27        this.startStep = new StartStep(locator); 
    2828        this.i18nBundleName = i18nBundleName; 
    2929    } 
    3030 
    31     public BlockStep getStartStep() { 
     31    public Step getStartStep() { 
    3232        return startStep; 
    3333    } 
    3434 
    35     public BlockStep getEndStep() { 
     35    public Step getEndStep() { 
    3636        if (endStep == null) 
    37             endStep = new EndStep(this, locator); 
     37            endStep = new EndStep(locator); 
    3838 
    3939        return endStep; 
    4040    } 
    4141 
    42     class StartStep extends BlockStep { 
    43         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    44             super(templateBlock, locator); 
     42    class StartStep extends Step { 
     43        public StartStep(Locator locator) { 
     44            super(locator); 
    4545        } 
    4646 
     
    5858    } 
    5959 
    60     class EndStep extends BlockStep { 
    61         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    62             super(templateBlock, locator); 
     60    class EndStep extends Step { 
     61        public EndStep(Locator locator) { 
     62            super(locator); 
    6363        } 
    6464 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/IfBlock.java

    r1346 r1347  
    4545        this.elFacade = elFacade; 
    4646        this.attributes = saxElement.getAttributes(); 
    47         this.startStep = new StartStep(this, locator); 
     47        this.startStep = new StartStep(locator); 
    4848    } 
    4949 
    50     public BlockStep getStartStep() { 
     50    public Step getStartStep() { 
    5151        return startStep; 
    5252    } 
    5353 
    54     public BlockStep getEndStep() { 
     54    public Step getEndStep() { 
    5555        if (endStep == null) 
    56             endStep = new EndStep(this, locator); 
     56            endStep = new EndStep(locator); 
    5757 
    5858        return endStep; 
    5959    } 
    6060 
    61     class StartStep extends BlockStep { 
     61    class StartStep extends Step { 
    6262 
    6363        private Expression elExpression; 
     
    6666        // runtimeNext may be endStep.compiledNext 
    6767 
    68         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    69             super(templateBlock, locator); 
     68        public StartStep(Locator locator) { 
     69            super(locator); 
    7070            String expression = attributes.getValue(TEST); 
    7171            if (expression == null) 
     
    8989    } 
    9090 
    91     class EndStep extends BlockStep { 
     91    class EndStep extends Step { 
    9292 
    9393        // compiledNext: first following instruction after block 
    9494        // runtimeNext idem 
    9595 
    96         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    97             super(templateBlock, locator); 
     96        public EndStep(Locator locator) { 
     97            super(locator); 
    9898        } 
    9999 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/ImportBlock.java

    r1346 r1347  
    3939            TemplateService templateService) { 
    4040        super(elFacade, locator, saxElement, templateService); 
    41         this.startStep = new StartStep(this, locator); 
     41        this.startStep = new StartStep(locator); 
    4242    } 
    4343 
    44     public BlockStep getStartStep() { 
     44    public Step getStartStep() { 
    4545        return startStep; 
    4646    } 
    4747 
    4848    @Override 
    49     public BlockStep getEndStep() { 
     49    public Step getEndStep() { 
    5050        if (endStep == null) 
    51             endStep = new EndStep(this, locator); 
     51            endStep = new EndStep(locator); 
    5252 
    5353        return endStep; 
    5454    } 
    5555 
    56     class StartStep extends BlockStep { 
     56    class StartStep extends Step { 
    5757 
    5858        private Expression sourceExpression; 
     
    6161        // runtimeNext: imported.startstep 
    6262 
    63         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    64             super(templateBlock, locator); 
     63        public StartStep(Locator locator) { 
     64            super(locator); 
    6565            String expression = attributes.getValue(SRC); 
    6666            if (expression == null) 
    67                 throw new TemplateException(SRC + " attribute is required on " + templateBlock.getSaxElement().getName()); 
     67                throw new TemplateException(SRC + " attribute is required on " + Directive.IMPORT.getTagName()); 
    6868            sourceExpression = elFacade.createExpression(expression, String.class); 
    6969            String mode = attributes.getValue(MODE); 
     
    115115    } 
    116116 
    117     class EndStep extends BlockStep { 
     117    class EndStep extends Step { 
    118118 
    119         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    120             super(templateBlock, locator); 
     119        public EndStep(Locator locator) { 
     120            super(locator); 
    121121        } 
    122122 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/IncludeBlock.java

    r1346 r1347  
    5050        this.elFacade = elFacade; 
    5151        this.attributes = saxElement.getAttributes(); 
    52         this.startStep = new StartStep(this, locator); 
     52        this.startStep = new StartStep(locator); 
    5353        this.templateService = templateService; 
    5454    } 
    5555 
    56     public BlockStep getStartStep() { 
     56    public Step getStartStep() { 
    5757        return startStep; 
    5858    } 
    5959 
    60     public BlockStep getEndStep() { 
     60    public Step getEndStep() { 
    6161        if (endStep == null) 
    62             endStep = new EndStep(this, locator); 
     62            endStep = new EndStep(locator); 
    6363 
    6464        return endStep; 
    6565    } 
    6666 
    67     class StartStep extends BlockStep { 
     67    class StartStep extends Step { 
    6868 
    6969        private Expression sourceExpression; 
     
    7272        // runtimeNext: included.startstep 
    7373 
    74         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    75             super(templateBlock, locator); 
     74        public StartStep(Locator locator) { 
     75            super(locator); 
    7676            String expression = attributes.getValue(SRC); 
    7777            if (expression == null) 
    78                 throw new TemplateException(SRC + " attribute is required on " + templateBlock.getSaxElement().getName()); 
     78                throw new TemplateException(SRC + " attribute is required on " + Directive.INCLUDE.getTagName()); 
    7979            sourceExpression = elFacade.createExpression(expression, String.class); 
    8080            String mode = attributes.getValue(MODE); 
     
    118118    } 
    119119 
    120     class EndStep extends BlockStep { 
     120    class EndStep extends Step { 
    121121 
    122122        // compiledNext: first following instruction after block 
    123123        // runtimeNext idem 
    124124 
    125         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    126             super(templateBlock, locator); 
     125        public EndStep(Locator locator) { 
     126            super(locator); 
    127127        } 
    128128 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/InheritBlock.java

    r1346 r1347  
    4444        this.elFacade = elFacade; 
    4545        this.attributes = saxElement.getAttributes(); 
    46         this.startStep = new StartStep(this, locator); 
     46        this.startStep = new StartStep(locator); 
    4747        this.templateService = templateService; 
    4848    } 
    4949 
    50     public BlockStep getStartStep() { 
     50    public Step getStartStep() { 
    5151        return startStep; 
    5252    } 
    5353 
    54     public BlockStep getEndStep() { 
     54    public Step getEndStep() { 
    5555        if (endStep == null) 
    56             endStep = new EndStep(this, locator); 
     56            endStep = new EndStep(locator); 
    5757 
    5858        return endStep; 
    5959    } 
    6060 
    61     class StartStep extends BlockStep { 
     61    class StartStep extends Step { 
    6262 
    6363        private Expression inheritExpression; 
    6464 
    65         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    66             super(templateBlock, locator); 
     65        public StartStep(Locator locator) { 
     66            super(locator); 
    6767            inheritExpression = elFacade.createExpression(attributes.getValue(TemplateBuilder.NAMESPACE_KTL, INHERIT), String.class); 
    6868        } 
     
    105105    } 
    106106 
    107     class EndStep extends BlockStep { 
     107    class EndStep extends Step { 
    108108 
    109         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    110             super(templateBlock, locator); 
     109        public EndStep(Locator locator) { 
     110            super(locator); 
    111111        } 
    112112 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/InheritanceBlock.java

    r1346 r1347  
    3838    public InheritanceBlock(Locator locator, SaxElement saxElement) { 
    3939        super(locator, saxElement); 
    40         this.startStep = new StartStep(this, locator); 
     40        this.startStep = new StartStep(locator); 
    4141        this.name = saxElement.getAttributes().getValue(NAME); 
    4242    } 
    4343 
    44     public BlockStep getStartStep() { 
     44    public Step getStartStep() { 
    4545        return startStep; 
    4646    } 
    4747 
    48     public BlockStep getEndStep() { 
     48    public Step getEndStep() { 
    4949        if (endStep == null) 
    50             endStep = new EndStep(this, locator); 
     50            endStep = new EndStep(locator); 
    5151 
    5252        return endStep; 
     
    5757    } 
    5858 
    59     class StartStep extends BlockStep { 
     59    class StartStep extends Step { 
    6060 
    61         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    62             super(templateBlock, locator); 
     61        public StartStep(Locator locator) { 
     62            super(locator); 
    6363        } 
    6464 
     
    7272    } 
    7373 
    74     class EndStep extends BlockStep { 
     74    class EndStep extends Step { 
    7575 
    76         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    77             super(templateBlock, locator); 
     76        public EndStep(Locator locator) { 
     77            super(locator); 
    7878        } 
    7979 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/InitBlock.java

    r841 r1347  
    3030    public InitBlock(Locator locator, SaxElement saxElement) { 
    3131        super(locator, saxElement); 
    32         this.startStep = new StartStep(this, locator); 
     32        this.startStep = new StartStep(locator); 
    3333    } 
    3434 
    35     public BlockStep getStartStep() { 
     35    public Step getStartStep() { 
    3636        return startStep; 
    3737    } 
    3838 
    39     public BlockStep getEndStep() { 
     39    public Step getEndStep() { 
    4040        if (endStep == null) 
    41             endStep = new EndStep(this, locator); 
     41            endStep = new EndStep(locator); 
    4242 
    4343        return endStep; 
    4444    } 
    4545 
    46     class StartStep extends BlockStep { 
     46    class StartStep extends Step { 
    4747 
    48         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    49             super(templateBlock, locator); 
     48        public StartStep(Locator locator) { 
     49            super(locator); 
    5050        } 
    5151 
     
    6161    } 
    6262 
    63     class EndStep extends BlockStep { 
     63    class EndStep extends Step { 
    6464 
    65         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    66             super(templateBlock, locator); 
     65        public EndStep(Locator locator) { 
     66            super(locator); 
    6767        } 
    6868 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/InsertBlock.java

    r1346 r1347  
    5454        this.elFacade = elFacade; 
    5555        this.attributes = saxElement.getAttributes(); 
    56         this.startStep = new StartStep(this, locator); 
     56        this.startStep = new StartStep(locator); 
    5757        this.parser = parser; 
    5858    } 
    5959 
    60     public BlockStep getStartStep() { 
     60    public Step getStartStep() { 
    6161        return startStep; 
    6262    } 
    6363 
    64     public BlockStep getEndStep() { 
     64    public Step getEndStep() { 
    6565        if (endStep == null) 
    66             endStep = new EndStep(this, locator); 
     66            endStep = new EndStep(locator); 
    6767 
    6868        return endStep; 
    6969    } 
    7070 
    71     class StartStep extends BlockStep { 
     71    class StartStep extends Step { 
    7272 
    7373        private Expression sourceExpression; 
    7474        private String mode; 
    7575 
    76         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    77             super(templateBlock, locator); 
     76        public StartStep(Locator locator) { 
     77            super(locator); 
    7878            String expression = attributes.getValue(SRC); 
    7979            sourceExpression = elFacade.createExpression(expression, String.class); 
     
    126126    } 
    127127 
    128     class EndStep extends BlockStep { 
     128    class EndStep extends Step { 
    129129 
    130         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    131             super(templateBlock, locator); 
     130        public EndStep(Locator locator) { 
     131            super(locator); 
    132132        } 
    133133 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/LexicalContextSwitchBlock.java

    r999 r1347  
    3737        this.sourceContext = source.getSourceContext(); 
    3838        this.baseUri = source.getReferenceInContext(); 
    39         this.startStep = new StartStep(this, locator); 
     39        this.startStep = new StartStep(locator); 
    4040        this.i18nBundleName = i18nBundleName; 
    4141    } 
    4242 
    43     public BlockStep getStartStep() { 
     43    public Step getStartStep() { 
    4444        return startStep; 
    4545    } 
    4646 
    47     public BlockStep getEndStep() { 
     47    public Step getEndStep() { 
    4848        if (endStep == null) 
    49             endStep = new EndStep(this, locator); 
     49            endStep = new EndStep(locator); 
    5050 
    5151        return endStep; 
    5252    } 
    5353 
    54     class StartStep extends BlockStep { 
    55         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    56             super(templateBlock, locator); 
     54    class StartStep extends Step { 
     55        public StartStep(Locator locator) { 
     56            super(locator); 
    5757        } 
    5858 
     
    7676    } 
    7777 
    78     class EndStep extends BlockStep { 
    79         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    80             super(templateBlock, locator); 
     78    class EndStep extends Step { 
     79        public EndStep(Locator locator) { 
     80            super(locator); 
    8181        } 
    8282 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/MacroBlock.java

    r1346 r1347  
    3636    public MacroBlock(Locator locator, SaxElement saxElement) { 
    3737        super(locator, saxElement); 
    38         this.startStep = new StartStep(this, locator); 
     38        this.startStep = new StartStep(locator); 
    3939        this.name = saxElement.getAttributes().getValue(NAME); 
    4040    } 
    4141 
    42     public BlockStep getStartStep() { 
     42    public Step getStartStep() { 
    4343        return startStep; 
    4444    } 
    4545 
    46     public BlockStep getEndStep() { 
     46    public Step getEndStep() { 
    4747        if (endStep == null) 
    48             endStep = new EndStep(this, locator); 
     48            endStep = new EndStep(locator); 
    4949 
    5050        return endStep; 
     
    5555    } 
    5656 
    57     class StartStep extends BlockStep { 
     57    class StartStep extends Step { 
    5858 
    5959        // compiledNext: first nested instruction 
    6060        // runtimeNext endstep.next 
    6161 
    62         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    63             super(templateBlock, locator); 
     62        public StartStep(Locator locator) { 
     63            super(locator); 
    6464        } 
    6565 
     
    7070    } 
    7171 
    72     class EndStep extends BlockStep { 
     72    class EndStep extends Step { 
    7373 
    7474        // compiledNext: first following instruction after block 
    7575        // runtimeNext endstep.next of the 'calling' macro 
    7676 
    77         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    78             super(templateBlock, locator); 
     77        public EndStep(Locator locator) { 
     78            super(locator); 
    7979        } 
    8080 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/OtherwiseBlock.java

    r487 r1347  
    4242        this.chooseBlock = chooseBlock; 
    4343        this.attributes = saxElement.getAttributes(); 
    44         this.startStep = new StartStep(this, locator); 
     44        this.startStep = new StartStep(locator); 
    4545    } 
    4646 
    47     public BlockStep getStartStep() { 
     47    public Step getStartStep() { 
    4848        return startStep; 
    4949    } 
    5050 
    51     public BlockStep getEndStep() { 
     51    public Step getEndStep() { 
    5252        if (endStep == null) 
    53             endStep = new EndStep(this, locator); 
     53            endStep = new EndStep(locator); 
    5454 
    5555        return endStep; 
    5656    } 
    5757 
    58     class StartStep extends BlockStep { 
     58    class StartStep extends Step { 
    5959 
    6060        // compiledNext: first nested instruction 
    6161        // runtimeNext idem 
    6262 
    63         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    64             super(templateBlock, locator); 
     63        public StartStep(Locator locator) { 
     64            super(locator); 
    6565        } 
    6666    } 
    6767 
    68     class EndStep extends BlockStep { 
     68    class EndStep extends Step { 
    6969 
    7070        // compiledNext: first following instruction after block, i.e. chooseBlock.endStep 
    7171        // runtimeNext: we prefer to skip a step and goto chooseBlock.endStep.compiledNext 
    7272 
    73         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    74             super(templateBlock, locator); 
     73        public EndStep(Locator locator) { 
     74            super(locator); 
    7575        } 
    7676 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/OutputBlock.java

    r909 r1347  
    4242        this.elFacade = elFacade; 
    4343        this.attributes = saxElement.getAttributes(); 
    44         this.startStep = new StartStep(this, locator); 
     44        this.startStep = new StartStep(locator); 
    4545        this.root = root; 
    4646    } 
    4747 
    48     public BlockStep getStartStep() { 
     48    public Step getStartStep() { 
    4949        return startStep; 
    5050    } 
    5151 
    52     public BlockStep getEndStep() { 
     52    public Step getEndStep() { 
    5353        if (endStep == null) 
    54             endStep = new EndStep(this, locator); 
     54            endStep = new EndStep(locator); 
    5555 
    5656        return endStep; 
    5757    } 
    5858 
    59     class StartStep extends BlockStep { 
     59    class StartStep extends Step { 
    6060 
    6161        // EL 
     
    6363        private String expression; 
    6464 
    65         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    66             super(templateBlock, locator); 
     65        public StartStep(Locator locator) { 
     66            super(locator); 
    6767            if (attributes.getLength() > 0) { 
    6868                elExpressions = new ArrayList<Expression>(); 
     
    104104    } 
    105105 
    106     class EndStep extends BlockStep { 
     106    class EndStep extends Step { 
    107107 
    108         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    109             super(templateBlock, locator); 
     108        public EndStep(Locator locator) { 
     109            super(locator); 
    110110        } 
    111111 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/ParameterBlock.java

    r1110 r1347  
    4848        this.elFacade = elFacade; 
    4949        this.attributes = saxElement.getAttributes(); 
    50         this.startStep = new StartStep(this, locator); 
     50        this.startStep = new StartStep(locator); 
    5151    } 
    5252 
    53     public BlockStep getStartStep() { 
     53    public Step getStartStep() { 
    5454        return startStep; 
    5555    } 
    5656 
    57     public BlockStep getEndStep() { 
     57    public Step getEndStep() { 
    5858        if (endStep == null) 
    59             endStep = new EndStep(this, locator); 
     59            endStep = new EndStep(locator); 
    6060 
    6161        return endStep; 
    6262    } 
    6363 
    64     class StartStep extends BlockStep { 
     64    class StartStep extends Step { 
    6565 
    6666        // variable stuff 
     
    6868        private final Expression elExpression; 
    6969 
    70         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    71             super(templateBlock, locator); 
     70        public StartStep(Locator locator) { 
     71            super(locator); 
    7272            name = attributes.getValue(NAME); 
    7373            String expression = attributes.getValue(VALUE); 
     
    9393    } 
    9494 
    95     class EndStep extends BlockStep { 
     95    class EndStep extends Step { 
    9696 
    9797        // compiledNext: first following instruction after block 
    9898        // runtimeNext: idem 
    9999 
    100         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    101             super(templateBlock, locator); 
     100        public EndStep(Locator locator) { 
     101            super(locator); 
    102102        } 
    103103 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/PrefixMappingFilterBlock.java

    r967 r1347  
    3535    public PrefixMappingFilterBlock() { 
    3636        super(); 
    37         this.startStep = new StartStep(this, locator); 
    38         this.endStep = new EndStep(this, locator); 
     37        this.startStep = new StartStep(locator); 
     38        this.endStep = new EndStep(locator); 
    3939    } 
    4040 
    41     public BlockStep getStartStep() { 
     41    public Step getStartStep() { 
    4242        return startStep; 
    4343    } 
    4444 
    45     public BlockStep getEndStep() { 
     45    public Step getEndStep() { 
    4646        return endStep; 
    4747    } 
     
    6868    } 
    6969 
    70     class StartStep extends BlockStep { 
    71         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    72             super(templateBlock, locator); 
     70    class StartStep extends Step { 
     71        public StartStep(Locator locator) { 
     72            super(locator); 
    7373        } 
    7474 
     
    8080    } 
    8181 
    82     class EndStep extends BlockStep { 
    83         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    84             super(templateBlock, locator); 
     82    class EndStep extends Step { 
     83        public EndStep(Locator locator) { 
     84            super(locator); 
    8585        } 
    8686 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/ProtectBlock.java

    r1346 r1347  
    2323        this.elFacade = elFacade; 
    2424        this.attributes = saxElement.getAttributes(); 
    25         this.startStep = new StartStep(this, locator); 
     25        this.startStep = new StartStep(locator); 
    2626    } 
    2727 
    28     public BlockStep getStartStep() { 
     28    public Step getStartStep() { 
    2929        return startStep; 
    3030    } 
    3131 
    32     public BlockStep getEndStep() { 
     32    public Step getEndStep() { 
    3333        if (endStep == null) 
    34             endStep = new EndStep(this, locator); 
     34            endStep = new EndStep(locator); 
    3535 
    3636        return endStep; 
    3737    } 
    3838 
    39     class StartStep extends BlockStep { 
     39    class StartStep extends Step { 
    4040 
    4141        private Expression accessExpr; 
    4242 
    43         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    44             super(templateBlock, locator); 
     43        public StartStep(Locator locator) { 
     44            super(locator); 
    4545            String expression = attributes.getValue(ACCESS_ATTR); 
    4646            if (expression == null) 
     
    7878    } 
    7979 
    80     class EndStep extends BlockStep { 
     80    class EndStep extends Step { 
    8181 
    82         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    83             super(templateBlock, locator); 
     82        public EndStep(Locator locator) { 
     83            super(locator); 
    8484        } 
    8585 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/SuperBlock.java

    r1346 r1347  
    4545        this.inheritanceBlock = inheritanceBlock; 
    4646        this.attributes = saxElement.getAttributes(); 
    47         this.startStep = new StartStep(this, locator); 
    48         this.endStep = new EndStep(this, locator); 
     47        this.startStep = new StartStep(locator); 
     48        this.endStep = new EndStep(locator); 
    4949    } 
    5050 
    51     public BlockStep getStartStep() { 
     51    public Step getStartStep() { 
    5252        return startStep; 
    5353    } 
    5454 
    55     public BlockStep getEndStep() { 
     55    public Step getEndStep() { 
    5656        return endStep; 
    5757    } 
    5858 
    59     class StartStep extends BlockStep { 
     59    class StartStep extends Step { 
    6060 
    61         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    62             super(templateBlock, locator); 
     61        public StartStep(Locator locator) { 
     62            super(locator); 
    6363        } 
    6464 
     
    8787    } 
    8888 
    89     class EndStep extends BlockStep { 
     89    class EndStep extends Step { 
    9090 
    91         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    92             super(templateBlock, locator); 
     91        public EndStep(Locator locator) { 
     92            super(locator); 
    9393        } 
    9494 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/TemplateBlock.java

    r576 r1347  
    3939    } 
    4040 
    41     public abstract BlockStep getStartStep(); 
     41    public abstract Step getStartStep(); 
    4242 
    43     public abstract BlockStep getEndStep(); 
     43    public abstract Step getEndStep(); 
    4444 
    4545    public SaxElement getSaxElement() { 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/VariableBlock.java

    r1346 r1347  
    1818import java.io.*; 
    1919 
    20 import org.apache.commons.logging.Log; 
    21 import org.apache.commons.logging.LogFactory; 
    2220import org.kauriproject.template.KauriSaxHandler.OutputFormat; 
    2321import org.kauriproject.template.el.ELFacade; 
     
    5755        this.elFacade = elFacade; 
    5856        this.attributes = saxElement.getAttributes(); 
    59         this.startStep = new StartStep(this, locator); 
    60     } 
    61  
    62     public BlockStep getStartStep() { 
     57        this.startStep = new StartStep(locator); 
     58    } 
     59 
     60    public Step getStartStep() { 
    6361        return startStep; 
    6462    } 
    6563 
    66     public BlockStep getEndStep() { 
     64    public Step getEndStep() { 
    6765        if (endStep == null) 
    68             endStep = new EndStep(this, locator); 
     66            endStep = new EndStep(locator); 
    6967 
    7068        return endStep; 
    7169    } 
    7270 
    73     class StartStep extends BlockStep { 
     71    class StartStep extends Step { 
    7472 
    7573        // variable stuff 
     
    8381        // runtimeNext may be endStep.compiledNext 
    8482 
    85         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    86             super(templateBlock, locator); 
     83        public StartStep(Locator locator) { 
     84            super(locator); 
    8785            name = attributes.getValue(NAME); 
    8886 
     
    192190    } 
    193191 
    194     class EndStep extends BlockStep { 
     192    class EndStep extends Step { 
    195193 
    196194        // compiledNext: first following instruction after block 
    197195        // runtimeNext idem 
    198196 
    199         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    200             super(templateBlock, locator); 
     197        public EndStep(Locator locator) { 
     198            super(locator); 
    201199        } 
    202200 
  • trunk/universe/kauri-template/src/main/java/org/kauriproject/template/WhenBlock.java

    r487 r1347  
    5151        this.chooseBlock = chooseBlock; 
    5252        this.attributes = saxElement.getAttributes(); 
    53         this.startStep = new StartStep(this, locator); 
     53        this.startStep = new StartStep(locator); 
    5454    } 
    5555 
    56     public BlockStep getStartStep() { 
     56    public Step getStartStep() { 
    5757        return startStep; 
    5858    } 
    5959 
    60     public BlockStep getEndStep() { 
     60    public Step getEndStep() { 
    6161        if (endStep == null) 
    62             endStep = new EndStep(this, locator); 
     62            endStep = new EndStep(locator); 
    6363 
    6464        return endStep; 
    6565    } 
    6666 
    67     class StartStep extends BlockStep { 
     67    class StartStep extends Step { 
    6868 
    6969        private Expression elExpression; 
     
    7272        // runtimeNext may be endStep.compiledNext 
    7373 
    74         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    75             super(templateBlock, locator); 
     74        public StartStep(Locator locator) { 
     75            super(locator); 
    7676            String expression = attributes.getValue(TEST); 
    7777            elExpression = elFacade.createExpression(expression, Boolean.class); 
     
    9292    } 
    9393 
    94     class EndStep extends BlockStep { 
     94    class EndStep extends Step { 
    9595 
    9696        // compiledNext: first following instruction after block 
    9797        // runtimeNext: always chooseBlock.endStep.compiledNext ! 
    9898 
    99         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    100             super(templateBlock, locator); 
     99        public EndStep(Locator locator) { 
     100            super(locator); 
    101101        } 
    102102 
  • trunk/universe/kauri-template/src/test/java/org/kauriproject/template/taglib/TestBlock.java

    r487 r1347  
    5656        this.elFacade = elFacade; 
    5757        this.attributes = saxElement.getAttributes(); 
    58         this.startStep = new StartStep(this, locator); 
     58        this.startStep = new StartStep(locator); 
    5959        this.textStep = new TextStep(elFacade, locator, TEXT.toCharArray(), 0, TEXT.length()); 
    6060    } 
    6161 
    62     public BlockStep getStartStep() { 
     62    public Step getStartStep() { 
    6363        return startStep; 
    6464    } 
    6565 
    66     public BlockStep getEndStep() { 
     66    public Step getEndStep() { 
    6767        if (endStep == null) 
    68             endStep = new EndStep(this, locator); 
     68            endStep = new EndStep(locator); 
    6969 
    7070        return endStep; 
    7171    } 
    7272 
    73     class StartStep extends BlockStep { 
     73    class StartStep extends Step { 
    7474 
    7575        private Expression elExpression; 
     
    7878        // runtimeNext may be newly composed step 
    7979 
    80         public StartStep(TemplateBlock templateBlock, Locator locator) { 
    81             super(templateBlock, locator); 
     80        public StartStep( Locator locator) { 
     81            super(locator); 
    8282            String expression = attributes.getValue(TEST); 
    8383            elExpression = elFacade.createExpression(expression, Boolean.class); 
     
    9999    } 
    100100 
    101     class EndStep extends BlockStep { 
     101    class EndStep extends Step { 
    102102 
    103103        // compiledNext: first following instruction after block 
    104104        // runtimeNext idem 
    105105 
    106         public EndStep(TemplateBlock templateBlock, Locator locator) { 
    107             super(templateBlock, locator); 
     106        public EndStep(Locator locator) { 
     107            super(locator); 
    108108        } 
    109109