Returns a NoType if the TypeMirror represents an non-type such as void, or package, etc. or throws an IllegalArgumentException.
(TypeMirror maybeNoType)
| 693 | * package, etc. or throws an {@link IllegalArgumentException}. |
| 694 | */ |
| 695 | public static NoType asNoType(TypeMirror maybeNoType) { |
| 696 | return maybeNoType.accept(NoTypeVisitor.INSTANCE, null); |
| 697 | } |
| 698 | |
| 699 | private static final class NoTypeVisitor extends CastingTypeVisitor<NoType> { |
| 700 | private static final NoTypeVisitor INSTANCE = new NoTypeVisitor(); |