code: public static boolean isPrimitive(TypeReference ref) {
  		if (ref.dimensions() > 0) return false;
  		return PRIMITIVE_TYPE_NAME_PATTERN.matcher(toQualifiedName(ref.getTypeName())).matches();
  	}
docs: Checks if the given type reference represents a primitive type.