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

Method addToList

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

Source from the content-addressed store, hash-verified

954 }
955
956 protected void addToList(InstanceScope scope, List<Object> list, Object o) {
957 o = convertAnythingIteratableToIterator(scope, o);
958 if ( o instanceof Iterator) {
959 // copy of elements into our temp list
960 Iterator<?> it = (Iterator<?>)o;
961 while ( it.hasNext() ) list.add(it.next());
962 }
963 else {
964 list.add(o);
965 }
966 }
967
968 /**
969 * 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