is Field Double Type - Android java.lang.reflect

Android examples for java.lang.reflect:Field

Description

is Field Double Type

Demo Code


//package com.java2s;

import java.lang.reflect.Field;

public class Main {
    public static boolean isDoubleType(Field field) {
        return isDoubleType(getFeildClass(field));
    }/*from www .  ja  va  2 s .  c o m*/

    public static boolean isDoubleType(Class<?> type) {
        if (type == double.class || type == Double.class) {
            return true;
        }
        return false;
    }

    public static Class<?> getFeildClass(Field field) {
        return field.getType();
    }
}

Related Tutorials