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

Method isSealed

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

@return true for native and emulated (annotation based) sealed classes @since 4.0.0

()

Source from the content-addressed store, hash-verified

1915 * @since 4.0.0
1916 */
1917 public boolean isSealed() {
1918 if (redirect != null) return redirect.isSealed();
1919 return !getAnnotations(ClassHelper.SEALED_TYPE).isEmpty() || !getPermittedSubclasses().isEmpty();
1920 }
1921
1922 /**
1923 * Determines whether this ClassNode has been resolved to an actual Java class.

Callers 10

detectNonSealedTypeMethod · 0.95
isNonSealedMethod · 0.95
visitMethod · 0.45
visitMethod · 0.45
wouldBeNativeSealedMethod · 0.45

Calls 3

getAnnotationsMethod · 0.95
isEmptyMethod · 0.45

Tested by 1