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

Method addToList

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

Source from the content-addressed store, hash-verified

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