code: public static Sensor newInstance(int type) {
      Sensor sensor = Shadow.newInstanceOf(Sensor.class);
      reflector(_Sensor_.class, sensor).setTypeCompat(type);
      return sensor;
    }
docs: Constructs a {@link Sensor} with a given type.