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

Method addToList

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

Source from the content-addressed store, hash-verified

940 }
941
942 protected void addToList(InstanceScope scope, List<Object> list, Object o) {
943 o = convertAnythingIteratableToIterator(scope, o);
944 if ( o instanceof Iterator) {
945 // copy of elements into our temp list
946 Iterator<?> it = (Iterator<?>)o;
947 while ( it.hasNext() ) list.add(it.next());
948 }
949 else {
950 list.add(o);
951 }
952 }
953
954 /**
955 * 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