Cloning the CompiledST for an ST instance allows ST#add to be called safely during interpretation for templates that do not contain formal arguments. @return A copy of the current CompiledST instance. The copy is a shallow copy, with the exception of the {@link #form
()
| 132 | */ |
| 133 | |
| 134 | @Override |
| 135 | public CompiledST clone() throws CloneNotSupportedException { |
| 136 | CompiledST clone = (CompiledST)super.clone(); |
| 137 | if ( formalArguments!=null ) { |
| 138 | formalArguments = Collections.synchronizedMap(new LinkedHashMap<String, FormalArgument>(formalArguments)); |
| 139 | } |
| 140 | return clone; |
| 141 | } |
| 142 | |
| 143 | public void addImplicitlyDefinedTemplate(CompiledST sub) { |
| 144 | sub.prefix = this.prefix; |