MCPcopy Create free account
hub / github.com/evant/android-retrolambda-lombok / adopt

Method adopt

src/main/lombok/ast/AbstractNode.java:80–84  ·  view source on GitHub ↗

Adopts (accepts as direct child) the provided node. @param child The node to adopt @return The child parameter for chaining. @throws IllegalStateException If child already has a parent (clone or unparent it first).

(AbstractNode child)

Source from the content-addressed store, hash-verified

78 * @throws IllegalStateException If {@code child} already has a parent (clone or unparent it first).
79 */
80 protected AbstractNode adopt(AbstractNode child) throws IllegalStateException {
81 child.ensureParentless();
82 child.parent = this;
83 return child;
84 }
85
86 /**
87 * Checks if this node is currently parentless.

Callers 5

addToStartMethod · 0.80
addToEndMethod · 0.80
addBeforeMethod · 0.80
addAfterMethod · 0.80
replaceMethod · 0.80

Calls 1

ensureParentlessMethod · 0.80

Tested by

no test coverage detected