MCPcopy Index your code
hub / github.com/bazelbuild/bazel / getGlobalByIndex

Method getGlobalByIndex

src/main/java/net/starlark/java/eval/Module.java:277–281  ·  view source on GitHub ↗

Returns the value of a global variable based on its index in this module ({@see getIndexOfGlobal}.) Returns null if the variable has not been assigned a value.

(int i)

Source from the content-addressed store, hash-verified

275 * getIndexOfGlobal}.) Returns null if the variable has not been assigned a value.
276 */
277 @Nullable
278 Object getGlobalByIndex(int i) {
279 Preconditions.checkArgument(i < globalIndex.size());
280 return this.globals[i];
281 }
282
283 /**
284 * Returns the index within this Module of a global variable, given its name, creating a new slot

Callers 2

getGlobalsMethod · 0.95
getGlobalMethod · 0.80

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected