public static String getType ( Object obj ) { if ( obj == null ) { return null ; } String type = null ; if ( obj instanceof String || obj instanceof Integer || obj instanceof Double || obj instanceof Boolean ) { type = obj . getClass ( ) . getName ( ) ; } return type ; }
Gets the type of the given object .