equal
deleted
inserted
replaced
45 import javax.lang.model.type.TypeMirror; |
45 import javax.lang.model.type.TypeMirror; |
46 import javax.lang.model.type.TypeVisitor; |
46 import javax.lang.model.type.TypeVisitor; |
47 import javax.lang.model.util.ElementFilter; |
47 import javax.lang.model.util.ElementFilter; |
48 import javax.lang.model.util.SimpleTypeVisitor9; |
48 import javax.lang.model.util.SimpleTypeVisitor9; |
49 |
49 |
|
50 import com.sun.tools.javac.util.DefinedBy; |
|
51 import com.sun.tools.javac.util.DefinedBy.Api; |
|
52 |
50 /* |
53 /* |
51 * <p><b>This is NOT part of any supported API. |
54 * <p><b>This is NOT part of any supported API. |
52 * If you write code that depends on this, you do so at your own |
55 * If you write code that depends on this, you do so at your own |
53 * risk. This code and its internal interfaces are subject to change |
56 * risk. This code and its internal interfaces are subject to change |
54 * or deletion without notice.</b></p> |
57 * or deletion without notice.</b></p> |
627 return maskName(field.getSimpleName().toString()); |
630 return maskName(field.getSimpleName().toString()); |
628 } |
631 } |
629 |
632 |
630 protected final boolean isLongOrDouble(TypeMirror t) { |
633 protected final boolean isLongOrDouble(TypeMirror t) { |
631 TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor9<Boolean,Void>() { |
634 TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor9<Boolean,Void>() { |
|
635 @DefinedBy(Api.LANGUAGE_MODEL) |
632 public Boolean defaultAction(TypeMirror t, Void p){ |
636 public Boolean defaultAction(TypeMirror t, Void p){ |
633 return false; |
637 return false; |
634 } |
638 } |
|
639 @DefinedBy(Api.LANGUAGE_MODEL) |
635 public Boolean visitArray(ArrayType t, Void p) { |
640 public Boolean visitArray(ArrayType t, Void p) { |
636 return visit(t.getComponentType(), p); |
641 return visit(t.getComponentType(), p); |
637 } |
642 } |
|
643 @DefinedBy(Api.LANGUAGE_MODEL) |
638 public Boolean visitPrimitive(PrimitiveType t, Void p) { |
644 public Boolean visitPrimitive(PrimitiveType t, Void p) { |
639 TypeKind tk = t.getKind(); |
645 TypeKind tk = t.getKind(); |
640 return (tk == TypeKind.LONG || tk == TypeKind.DOUBLE); |
646 return (tk == TypeKind.LONG || tk == TypeKind.DOUBLE); |
641 } |
647 } |
642 }; |
648 }; |