MCPcopy Create free account
hub / github.com/chibash/stone / getForASTList

Method getForASTList

src/stone/Parser.java:246–260  ·  view source on GitHub ↗
(Class<? extends ASTree> clazz)

Source from the content-addressed store, hash-verified

244 }
245 }
246 protected static Factory getForASTList(Class<? extends ASTree> clazz) {
247 Factory f = get(clazz, List.class);
248 if (f == null)
249 f = new Factory() {
250 protected ASTree make0(Object arg) throws Exception {
251 @SuppressWarnings("unchecked")
252 List<ASTree> results = (List<ASTree>)arg;
253 if (results.size() == 1)
254 return results.get(0);
255 else
256 return new ASTList(results);
257 }
258 };
259 return f;
260 }
261 protected static Factory get(Class<? extends ASTree> clazz,
262 Class<?> argType)
263 {

Callers 2

ExprMethod · 0.95
resetMethod · 0.95

Calls 1

getMethod · 0.95

Tested by

no test coverage detected