public static ErrorType asError(TypeMirror maybeErrorType) {
        return maybeErrorType.accept(new CastingTypeVisitor<ErrorType>() {
            @Override
            public ErrorType visitError(ErrorType type, String p) {
                return type;
            }
        }, "error type");
    }
Utilities related to {@link TypeMirror} instances.

@author Gregory Kick
@since 2.0
android/annotation_processors/permission-requester-compiler/src/main/java/github/tornaco/permission/compiler/common/MoreTypes.java