- public static boolean hasParentOfType(final EffectiveStmtCtx.Current<?, ?> stmt,
- final StatementDefinition parentType) {
- return hasParentOfType(stmt.caerbannog(), parentType);
+ public static boolean hasParentOfType(final EffectiveStmtCtx stmt, final StatementDefinition parentType) {
+ requireNonNull(parentType);
+ final Parent parent = stmt.effectiveParent();
+ return parent != null && parentType.equals(parent.publicDefinition());