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

Method addField

src/main/java/org/codehaus/groovy/ast/ClassNode.java:725–727  ·  view source on GitHub ↗

Adds a FieldNode to this ClassNode. The field is added to the end of the field list and its declaring class is set to this node's redirect target. The field is registered in the internal field index for fast lookup by name. @param node the FieldNode to add, must not be null

(FieldNode node)

Source from the content-addressed store, hash-verified

723 * @see #removeField(String)
724 */
725 public void addField(FieldNode node) {
726 addField(node, true);
727 }
728
729 private void addField(FieldNode node, boolean append) {
730 ClassNode r = redirect();

Callers 15

visitMethod · 0.95
visitMethod · 0.95
visitMethod · 0.95
testFieldsMethod · 0.95
buildMethodMethod · 0.95
buildClassMethod · 0.95
addFieldFirstMethod · 0.95
addPropertyMethod · 0.95
visitMethod · 0.95
visitMethod · 0.95

Calls 6

redirectMethod · 0.95
addMethod · 0.65
putMethod · 0.65
getNameMethod · 0.65
setDeclaringClassMethod · 0.45
setOwnerMethod · 0.45

Tested by 7

visitMethod · 0.76
visitMethod · 0.76
visitMethod · 0.76
testFieldsMethod · 0.76
setUpMethod · 0.36