class UnaryExprContext extends AbstractJavaParserContext<UnaryExpr> {

    public UnaryExprContext(UnaryExpr wrappedNode, TypeSolver typeSolver) {
        super(wrappedNode, typeSolver);
    }

    @Override
    public List<PatternExpr> patternExprsExposedFromChildren() {
        List<PatternExpr> results = new ArrayList<>();

        // Propagate any pattern expressions "up"
        if(wrappedNode.getOperator() == UnaryExpr.Operator.LOGICAL_COMPLEMENT) {
            Context innerContext = JavaParserFactory.getContext(wrappedNode.getExpression(), typeSolver);

            // Avoid infinite loop
            if(!this.equals(innerContext)) {
                // Note that `UnaryExpr.Operator.LOGICAL_COMPLEMENT` is `!`
                // Previously negated pattern expressions are now available (double negatives) -- e.g. if(!!("a" instanceof String s)) {}
                results.addAll(innerContext.negatedPatternExprsExposedFromChildren());
            }
        }

        return results;
    }

    @Override
    public List<PatternExpr> negatedPatternExprsExposedFromChildren() {<FILL_FUNCTION_BODY>}

}

        List<PatternExpr> results = new ArrayList<>();

        // Propagate any pattern expressions "up"
        if(wrappedNode.getOperator() == UnaryExpr.Operator.LOGICAL_COMPLEMENT) {
            Context innerContext = JavaParserFactory.getContext(wrappedNode.getExpression(), typeSolver);

            if(!this.equals(innerContext)) {
                // Note that `UnaryExpr.Operator.LOGICAL_COMPLEMENT` is `!`
                // Previously available pattern expressions are now negated (double negatives) -- e.g. if(!("a" instanceof String s)) {}
                results.addAll(innerContext.patternExprsExposedFromChildren());
            }
        }

        return results;
    
<methods>public void <init>(com.github.javaparser.ast.expr.UnaryExpr, com.github.javaparser.resolution.TypeSolver) ,public boolean equals(java.lang.Object) ,public final Optional<com.github.javaparser.resolution.Context> getParent() ,public com.github.javaparser.ast.expr.UnaryExpr getWrappedNode() ,public int hashCode() ,public Optional<com.github.javaparser.resolution.MethodUsage> solveMethodAsUsage(java.lang.String, List<com.github.javaparser.resolution.types.ResolvedType>) ,public SymbolReference<? extends com.github.javaparser.resolution.declarations.ResolvedValueDeclaration> solveSymbolInParentContext(java.lang.String) ,public static SymbolReference<com.github.javaparser.resolution.declarations.ResolvedValueDeclaration> solveWith(com.github.javaparser.resolution.SymbolDeclarator, java.lang.String) <variables>protected com.github.javaparser.resolution.TypeSolver typeSolver,protected com.github.javaparser.ast.expr.UnaryExpr wrappedNode