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
()
| 133 | */ |
| 134 | |
| 135 | @Override |
| 136 | public CompiledST clone() throws CloneNotSupportedException { |
| 137 | CompiledST clone = (CompiledST)super.clone(); |
| 138 | if ( formalArguments!=null ) { |
| 139 | formalArguments = Collections.synchronizedMap(new LinkedHashMap<String, FormalArgument>(formalArguments)); |
| 140 | } |
| 141 | return clone; |
| 142 | } |
| 143 | |
| 144 | |
| 145 | public void addImplicitlyDefinedTemplate(CompiledST sub) { |