damp.ekeko.jdt.rewrites documentation
add-element
(add-element rewrite lst newnode idx)
(add-element lst newnode idx)
Add newnode to the given list at position idx.
add-node
(add-node parent propertykey newnode idx)
(add-node rewrite parent propertykey newnode idx)
Add newnode (or clone of newnode when ASTs are incompatible) to propertyList of the given parent at idx position.
change-property-node
(change-property-node rewrite node propertykey value)
(change-property-node node propertykey value)
Change property of node.
newast
(newast key & {:as propertykey2value})
Creates a new node of the given ekeko keyword (and optional property keyword to value pairs).
newast-for-rewrite
(newast-for-rewrite rewrite key & {:as propertykey2value})
Creates a new node of the given ekeko keyword (and optional property keyword to value pairs).
remove-node
(remove-node rewrite node)
(remove-node node)
Remove node.
replace-node
(replace-node rewrite node newnode)
(replace-node node newnode)
Replace node with newnode (if ASTs are compatible) or clone of newnode (when ASTs are incompatible).
replace-value
(replace-value value newvalue)
(replace-value rewrite value newvalue)
Replaces a non-ASTNode primitive value by the given value.