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

Method equals

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

Compares this ClassNode with another object for equality. Two ClassNodes are considered equal if: They are the same object (identity check) Both are ClassNode instances and either have identical redirects, identical component types (for arrays), or have matching text repres

(Object that)

Source from the content-addressed store, hash-verified

1735 * @see #redirect()
1736 */
1737 @Override
1738 public boolean equals(Object that) {
1739 if (that == this) return true;
1740 if (!(that instanceof ClassNode)) return false;
1741 if (redirect != null) return redirect.equals(that);
1742 if (componentType != null) return componentType.equals(((ClassNode) that).componentType);
1743 return ((ClassNode) that).getText().equals(getText()); // arrays could be "T[]" or "[LT;"
1744 }
1745
1746 /**
1747 * Returns the hash code for this {@link ClassNode}.

Callers 15

visitMethod · 0.95
printFieldMethod · 0.95
printAnnotationsMethod · 0.95
passThisReferenceMethod · 0.95
getMetaClassFieldMethod · 0.95
visitMethod · 0.95
equalParametersNormalMethod · 0.95

Calls 3

getTextMethod · 0.95
equalsMethod · 0.65
getTextMethod · 0.65

Tested by

no test coverage detected