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

Method bind

src/main/java/groovy/concurrent/DataflowVariable.java:79–90  ·  view source on GitHub ↗

Binds this variable to the given value. Can only be called once; subsequent calls throw IllegalStateException. @param value the value to bind (may be null) @throws IllegalStateException if already bound

(T value)

Source from the content-addressed store, hash-verified

77 * @throws IllegalStateException if already bound
78 */
79 public void bind(T value) {
80 if (!future.complete(value)) {
81 String current;
82 try {
83 current = String.valueOf(future.getNow(null));
84 } catch (CompletionException e) {
85 current = "error: " + e.getCause();
86 }
87 throw new IllegalStateException(
88 "DataflowVariable is already bound to: " + current);
89 }
90 }
91
92 /**
93 * Binds this variable to an error. Any thread awaiting the value

Callers 1

leftShiftMethod · 0.95

Calls 4

completeMethod · 0.45
valueOfMethod · 0.45
getNowMethod · 0.45
getCauseMethod · 0.45

Tested by

no test coverage detected