MCPcopy Index your code
hub / github.com/antlr/codebuff / addToList

Method addToList

output/java8/1.4.15/Interpreter.java:926–936  ·  view source on GitHub ↗
(InstanceScope scope, List<Object> list, Object o)

Source from the content-addressed store, hash-verified

924 }
925
926 protected void addToList(InstanceScope scope, List<Object> list, Object o) {
927 o = convertAnythingIteratableToIterator(scope, o);
928 if ( o instanceof Iterator ) {
929 // copy of elements into our temp list
930 Iterator<?> it = (Iterator<?>)o;
931 while ( it.hasNext() ) list.add(it.next());
932 }
933 else {
934 list.add(o);
935 }
936 }
937
938 /**
939 * 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