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