1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/*
* Copyright 2018 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.auto.value.processor;
import com.google.common.collect.ImmutableList;
/**
* The variables to substitute into the autovalue.vm or autooneof.vm template.
*
* @author emcmanus@google.com (Éamonn McManus)
*/
@SuppressWarnings("unused") // the fields in this class are only read via reflection
abstract class AutoValueOrOneOfTemplateVars extends TemplateVars {
/** Whether to generate an equals(Object) method. */
Boolean equals;
/** Whether to generate a hashCode() method. */
Boolean hashCode;
/** Whether to generate a toString() method. */
Boolean toString;
/**
* A string representing the parameter type declaration of the equals(Object) method, including
* any annotations. If {@link #equals} is false, this field is ignored (but it must still be
* non-null).
*/
String equalsParameterType;
/** The encoding of the {@code Generated} class. Empty if the class is not available. */
String generated;
/** The package of the class with the {@code @AutoValue} annotation and its generated subclass. */
String pkg;
/**
* The name of the class with the {@code @AutoValue} annotation, including containing classes but
* not including the package name.
*/
String origClass;
/** The simple name of the class with the {@code @AutoValue} annotation. */
String simpleClassName;
/**
* The full spelling of any annotations to add to this class, or an empty list if there are none.
* A non-empty value might look something like {@code
* "@`com.google.common.annotations.GwtCompatible`(serializable = true)"}. The {@code ``} marks
* are explained in {@link TypeEncoder}.
*/
ImmutableList<String> annotations;
/**
* The formal generic signature of the class with the {@code @AutoValue} or {@code AutoOneOf}
* annotation and any generated subclass. This is empty, or contains type variables with optional
* bounds, for example {@code <K, V extends K>}.
*/
String formalTypes;
/**
* The generic signature used by any generated subclass for its superclass reference. This is
* empty, or contains only type variables with no bounds, for example {@code <K, V>}.
*/
String actualTypes;
/**
* The generic signature in {@link #actualTypes} where every variable has been replaced by a
* wildcard, for example {@code <?, ?>}.
*/
String wildcardTypes;
}
|