Example usage for javax.lang.model.util Types getPrimitiveType

List of usage examples for javax.lang.model.util Types getPrimitiveType

Introduction

In this page you can find the example usage for javax.lang.model.util Types getPrimitiveType.

Prototype

PrimitiveType getPrimitiveType(TypeKind kind);

Source Link

Document

Returns a primitive type.

Usage

From source file:com.vimeo.stag.processor.utils.TypeUtils.java

private static boolean isPrimitive(@NotNull TypeMirror type, @NotNull Types utils) {
    try {/*w ww. j a  va  2 s  .  c  o m*/
        utils.getPrimitiveType(type.getKind());
        return true;
    } catch (IllegalArgumentException ignored) {
        return false;
    }
}