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

Method isDefault

src/main/java/org/codehaus/groovy/ast/MethodNode.java:286–289  ·  view source on GitHub ↗

Checks whether this method is a default method. Default methods are public methods in interfaces with no abstract modifier. @return true if this method is a default interface method

()

Source from the content-addressed store, hash-verified

284 * @return true if this method is a default interface method
285 */
286 public boolean isDefault() {
287 return (modifiers & (ACC_ABSTRACT | ACC_PUBLIC | ACC_STATIC)) == ACC_PUBLIC &&
288 Optional.ofNullable(getDeclaringClass()).filter(ClassNode::isInterface).isPresent();
289 }
290
291 /**
292 * Checks whether this method is declared as final.

Callers 15

getGetterMethodMethod · 0.95
printMethodMethod · 0.45
getSuperMethodsMethod · 0.45
hasAbstractMethodsMethod · 0.45
findVisibleMethodsMethod · 0.45
hasPossibleMethodMethod · 0.45
getPropertyMethod · 0.45

Calls 3

isPresentMethod · 0.80
filterMethod · 0.65
getDeclaringClassMethod · 0.45

Tested by

no test coverage detected