MCPcopy Index your code
hub / github.com/apache/groovy / getVariable

Method getVariable

src/main/java/groovy/lang/Binding.java:62–73  ·  view source on GitHub ↗

@param name the name of the variable to lookup @return the variable value

(String name)

Source from the content-addressed store, hash-verified

60 * @return the variable value
61 */
62 public Object getVariable(String name) {
63 if (variables == null)
64 throw new MissingPropertyException(name, this.getClass());
65
66 Object result = variables.get(name);
67
68 if (result == null && !variables.containsKey(name)) {
69 throw new MissingPropertyException(name, this.getClass());
70 }
71
72 return result;
73 }
74
75 /**
76 * Sets the value of the given variable

Callers 3

getPropertyMethod · 0.95
getPropertyMethod · 0.45

Calls 3

getClassMethod · 0.80
getMethod · 0.65
containsKeyMethod · 0.65

Tested by 1