code: public static void set_value(final Object value, final Attribute attribute) throws DevFailed {
  	try {
  
  	    if (value instanceof Short) {
  		attribute.set_value(((Short) value).shortValue());
  	    } else if (value instanceof Byte) {
  		attribute.set_value(((Byte) value).shortValue());
  	    } else if (value instanceof String) {
  		attribute.set_value((String) value);
  	    } else if (value instanceof Integer) {
  		attribute.set_value(((Integer) value).intValue());
  	    } else if (value instanceof Long) {
  		attribute.set_value(((Long) value).longValue());
  	    } else if (value instanceof Float) {
  		attribute.set_value(((Float) value).doubleValue());
  	    } else if (value instanceof Boolean) {
  		attribute.set_value(((Boolean) value).booleanValue());
  	    } else if (value instanceof Double) {
  		attribute.set_value(((Double) value).doubleValue());
  	    } else if (value instanceof DevState) {
  		attribute.set_value((DevState) value);
  	    } else {
  		// System.out.println(value.getClass().getName());
  		Except.throw_exception("TANGO_WRONG_DATA_ERROR", "input type " + value.getClass()
  			+ " not supported",
  			"AttributeHelper.insert(Object value,deviceAttributeWritten)");
  	    }
  	} catch (final Exception e) {
  	    e.printStackTrace();
  	}
      }
docs: Set value with an object on Attribute
  
  @param value
  the value to set on Attribute of JServer, possibles Class :
  Short, String, Long, Float, Boolean, Integer, Double,
  DevState.
  @param attribute
  the attribute to set
  @throws DevFailed