is Class representing a Basic Type - Android java.lang.reflect

Android examples for java.lang.reflect:Class

Description

is Class representing a Basic Type

Demo Code


//package com.java2s;

public class Main {
    public static boolean isBasicType(Class<?> clazz) {
        return (clazz == Integer.TYPE) || (clazz == Long.TYPE)
                || (clazz == Float.TYPE) || (clazz == Double.TYPE)
                || (clazz == Character.TYPE) || (clazz == Byte.TYPE)
                || (clazz == Short.TYPE);
    }/*  w  w  w. j a va2 s  .com*/
}

Related Tutorials