From a740bbd12930b7940941cfc3dccfa4a8afa4fc9c Mon Sep 17 00:00:00 2001 From: Sokwhan Huh Date: Wed, 21 Feb 2024 13:27:35 -0800 Subject: [PATCH] Mark type-checker implementation as internal PiperOrigin-RevId: 609103910 --- checker/src/main/java/dev/cel/checker/BUILD.bazel | 1 + .../src/main/java/dev/cel/checker/CelCheckerLegacyImpl.java | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/checker/src/main/java/dev/cel/checker/BUILD.bazel b/checker/src/main/java/dev/cel/checker/BUILD.bazel index d5832a4f..0053d906 100644 --- a/checker/src/main/java/dev/cel/checker/BUILD.bazel +++ b/checker/src/main/java/dev/cel/checker/BUILD.bazel @@ -73,6 +73,7 @@ java_library( "//common", "//common:compiler_common", "//common:options", + "//common/annotations", "//common/ast:expr_converter", "//common/internal:env_visitor", "//common/internal:errors", diff --git a/checker/src/main/java/dev/cel/checker/CelCheckerLegacyImpl.java b/checker/src/main/java/dev/cel/checker/CelCheckerLegacyImpl.java index 4ed263c1..950c919e 100644 --- a/checker/src/main/java/dev/cel/checker/CelCheckerLegacyImpl.java +++ b/checker/src/main/java/dev/cel/checker/CelCheckerLegacyImpl.java @@ -40,6 +40,7 @@ import dev.cel.common.CelSourceLocation; import dev.cel.common.CelValidationResult; import dev.cel.common.CelVarDecl; +import dev.cel.common.annotations.Internal; import dev.cel.common.ast.CelExprConverter; import dev.cel.common.internal.EnvVisitable; import dev.cel.common.internal.EnvVisitor; @@ -57,8 +58,12 @@ /** * {@code CelChecker} implementation which uses the original CEL-Java APIs to provide a simple, * consistent interface for type-checking. + * + *

CEL Library Internals. Do Not Use. Consumers should use {@code CelCompilerFactory} to + * instantiate a type-checker. */ @Immutable +@Internal public final class CelCheckerLegacyImpl implements CelChecker, EnvVisitable { private final CelOptions celOptions;