This allows hashCode to be overridden by a closure field method attached to the expando object. @see java.lang.Object#hashCode()
()
| 181 | * @see java.lang.Object#hashCode() |
| 182 | */ |
| 183 | @Override |
| 184 | public int hashCode() { |
| 185 | Object method = getProperties().get("hashCode"); |
| 186 | if (method instanceof Closure closure) { |
| 187 | // invoke overridden hashCode closure method |
| 188 | closure.setDelegate(this); |
| 189 | Integer ret = (Integer) closure.call(); |
| 190 | return ret; |
| 191 | } else { |
| 192 | return super.hashCode(); |
| 193 | } |
| 194 | } |
| 195 | |
| 196 | /** |
| 197 | * Factory method to create a new Map used to store the expando properties map |
nothing calls this directly
no test coverage detected