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

Method addToList

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

Source from the content-addressed store, hash-verified

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