MCPcopy Create free account
hub / github.com/antlr/codebuff / clone

Method clone

output/java/1.4.15/CompiledST.java:134–141  ·  view source on GitHub ↗

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

()

Source from the content-addressed store, hash-verified

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;

Callers 1

storeArgsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected