xref: /aosp_15_r20/external/jazzer-api/src/main/java/jaz/Ter.java (revision 33edd6723662ea34453766bfdca85dbfdd5342b8)
1 // Copyright 2021 Code Intelligence GmbH
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 package jaz;
16 
17 /**
18  * A safe to use companion of {@link jaz.Zer} that is used to produce serializable instances of it
19  * with only light patching.
20  */
21 @SuppressWarnings("unused")
22 public class Ter implements java.io.Serializable {
23   static final long serialVersionUID = 42L;
24 
25   public static final byte REFLECTIVE_CALL_SANITIZER_ID = 0;
26   public static final byte DESERIALIZATION_SANITIZER_ID = 1;
27   public static final byte EXPRESSION_LANGUAGE_SANITIZER_ID = 2;
28 
29   private byte sanitizer = REFLECTIVE_CALL_SANITIZER_ID;
30 
Ter()31   public Ter() {}
32 
Ter(byte sanitizer)33   public Ter(byte sanitizer) {
34     this.sanitizer = sanitizer;
35   }
36 }
37