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

Method addToList

output/java/1.4.19/Interpreter.java:958–968  ·  view source on GitHub ↗
(InstanceScope scope, List<Object> list, Object o)

Source from the content-addressed store, hash-verified

956 }
957
958 protected void addToList(InstanceScope scope, List<Object> list, Object o) {
959 o = convertAnythingIteratableToIterator(scope, o);
960 if ( o instanceof Iterator) {
961 // copy of elements into our temp list
962 Iterator<?> it = (Iterator<?>)o;
963 while ( it.hasNext() ) list.add(it.next());
964 }
965 else {
966 list.add(o);
967 }
968 }
969
970 /**
971 * Return the first attribute if multi-valued, or the attribute itself if

Callers 1

_execMethod · 0.95

Calls 4

addMethod · 0.65
nextMethod · 0.65
hasNextMethod · 0.45

Tested by

no test coverage detected