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

Method addProperty

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

Adds a PropertyNode to this ClassNode. The property's associated field is also added to the field list, and the property itself is registered in the properties list. The property's declaring class is set to this node's redirect target. @param node the PropertyNode to add, must not b

(PropertyNode node)

Source from the content-addressed store, hash-verified

801 * @see PropertyNode
802 */
803 public void addProperty(PropertyNode node) {
804 node.setDeclaringClass(redirect());
805 addField(node.getField());
806 getProperties().add(node);
807 }
808
809 /**
810 * Creates and adds a {@link PropertyNode} to this ClassNode with the specified properties,

Callers 5

testLoopMethod · 0.95
testPropertiesMethod · 0.95
assertIterateMethod · 0.95
declarePropertyMethod · 0.45

Calls 14

redirectMethod · 0.95
addFieldMethod · 0.95
getPropertiesMethod · 0.95
getGetterBlockMethod · 0.80
setGetterBlockMethod · 0.80
getSetterBlockMethod · 0.80
setSetterBlockMethod · 0.80
addMethod · 0.65
equalsMethod · 0.65
getNameMethod · 0.65
getInitialExpressionMethod · 0.65
setDeclaringClassMethod · 0.45

Tested by 4

testLoopMethod · 0.76
testPropertiesMethod · 0.76
assertIterateMethod · 0.76