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

Method addToList

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

Source from the content-addressed store, hash-verified

901 }
902
903 protected void addToList(InstanceScope scope, List<Object> list, Object o) {
904 o = convertAnythingIteratableToIterator(scope, o);
905 if ( o instanceof Iterator ) {
906 // copy of elements into our temp list
907 Iterator<?> it = (Iterator<?>)o;
908 while ( it.hasNext() ) list.add(it.next());
909 }
910 else {
911 list.add(o);
912 }
913 }
914
915 /**
916 * 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