2323import com .google .errorprone .annotations .CanIgnoreReturnValue ;
2424import com .google .errorprone .annotations .CheckReturnValue ;
2525import com .google .errorprone .annotations .Immutable ;
26- import com .google .errorprone .annotations .InlineMe ;
2726import dev .cel .common .ast .CelExpr .ExprKind .Kind ;
2827import java .util .ArrayList ;
2928import java .util .Arrays ;
@@ -90,32 +89,14 @@ public CelCall call() {
9089 return exprKind ().call ();
9190 }
9291
93- /**
94- * @deprecated Use {@link #list()} instead.
95- */
96- @ Deprecated
97- @ InlineMe (replacement = "this.list()" )
98- public final CelList createList () {
99- return list ();
100- }
101-
10292 /**
10393 * {@inheritDoc}
10494 *
10595 * @throws UnsupportedOperationException if expression is not {@link Kind#LIST}.
10696 */
10797 @ Override
10898 public CelList list () {
109- return exprKind ().createList ();
110- }
111-
112- /**
113- * @deprecated Use {@link #list()} instead.
114- */
115- @ Deprecated
116- @ InlineMe (replacement = "this.struct()" )
117- public final CelStruct createStruct () {
118- return struct ();
99+ return exprKind ().list ();
119100 }
120101
121102 /**
@@ -125,16 +106,7 @@ public final CelStruct createStruct() {
125106 */
126107 @ Override
127108 public CelStruct struct () {
128- return exprKind ().createStruct ();
129- }
130-
131- /**
132- * @deprecated Use {@link #list()} instead.
133- */
134- @ Deprecated
135- @ InlineMe (replacement = "this.map()" )
136- public final CelMap createMap () {
137- return map ();
109+ return exprKind ().struct ();
138110 }
139111
140112 /**
@@ -144,7 +116,7 @@ public final CelMap createMap() {
144116 */
145117 @ Override
146118 public CelMap map () {
147- return exprKind ().createMap ();
119+ return exprKind ().map ();
148120 }
149121
150122 /**
@@ -203,7 +175,7 @@ public CelCall callOrDefault() {
203175 */
204176 public CelList listOrDefault () {
205177 return exprKind ().getKind ().equals (ExprKind .Kind .LIST )
206- ? exprKind ().createList ()
178+ ? exprKind ().list ()
207179 : CelList .newBuilder ().build ();
208180 }
209181
@@ -213,7 +185,7 @@ public CelList listOrDefault() {
213185 */
214186 public CelStruct structOrDefault () {
215187 return exprKind ().getKind ().equals (ExprKind .Kind .STRUCT )
216- ? exprKind ().createStruct ()
188+ ? exprKind ().struct ()
217189 : CelStruct .newBuilder ().build ();
218190 }
219191
@@ -223,7 +195,7 @@ public CelStruct structOrDefault() {
223195 */
224196 public CelMap mapOrDefault () {
225197 return exprKind ().getKind ().equals (ExprKind .Kind .MAP )
226- ? exprKind ().createMap ()
198+ ? exprKind ().map ()
227199 : CelMap .newBuilder ().build ();
228200 }
229201
@@ -405,37 +377,10 @@ public enum Kind {
405377
406378 public abstract CelList list ();
407379
408- /**
409- * @deprecated Use {@link #list()} instead.
410- */
411- @ Deprecated
412- @ InlineMe (replacement = "this.list()" )
413- public final CelList createList () {
414- return list ();
415- }
416-
417380 public abstract CelStruct struct ();
418381
419- /**
420- * @deprecated Use {@link #struct()} instead.
421- */
422- @ Deprecated
423- @ InlineMe (replacement = "this.struct()" )
424- public final CelStruct createStruct () {
425- return struct ();
426- }
427-
428382 public abstract CelMap map ();
429383
430- /**
431- * @deprecated Use {@link #map()} instead.
432- */
433- @ Deprecated
434- @ InlineMe (replacement = "this.map()" )
435- public final CelMap createMap () {
436- return map ();
437- }
438-
439384 public abstract CelComprehension comprehension ();
440385 }
441386
0 commit comments