MCPcopy Create free account
hub / github.com/apache/groovy / hasProperty

Method hasProperty

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

Tests whether a property with the given name exists in this ClassNode. This method searches through the properties list, comparing by name. @param name the name of the property to check @return true if a property with the given name exists, false otherwise @see #getProperty(String)

(String name)

Source from the content-addressed store, hash-verified

1041 * @see #getProperties()
1042 */
1043 public boolean hasProperty(String name) {
1044 return getProperties().stream().map(PropertyNode::getName).anyMatch(name::equals);
1045 }
1046
1047 /**
1048 * Finds a {@link PropertyNode} matching the given name in this ClassNode.

Callers

nothing calls this directly

Calls 3

getPropertiesMethod · 0.95
mapMethod · 0.65
streamMethod · 0.65

Tested by

no test coverage detected