blob: 9ba3765a4a21cf9c1d4ed994216723e2cf461cc9 (
plain)
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
|
package lombok.javac.handlers;
import java.lang.reflect.Modifier;
import com.sun.tools.javac.tree.JCTree.JCVariableDecl;
import lombok.AccessLevel;
import lombok.core.TransformationsUtil;
class PKG {
static String toGetterName(JCVariableDecl field) {
CharSequence fieldName = field.name;
boolean isBoolean = field.vartype.toString().equals("boolean");
return TransformationsUtil.toGetterName(fieldName, isBoolean);
}
static int toJavacModifier(AccessLevel accessLevel) {
switch ( accessLevel ) {
case MODULE:
case PACKAGE:
return 0;
default:
case PUBLIC:
return Modifier.PUBLIC;
case PRIVATE:
return Modifier.PRIVATE;
case PROTECTED:
return Modifier.PROTECTED;
}
}
}
|