JBoolean& JFieldProxy<JBoolean>::operator=( const JBoolean& type ) { JNIEnv* env = helper::attach(); jvalue value = type.getJavaJniValue(); setJavaJniValue( value ); /* If we don't have a parent object, we are a static field member. */ if ( ! parent ) { jclass fieldClass = parentClass; env->SetStaticBooleanField( fieldClass, fieldID, type.getBoolean() ); } /* Otherwise, we are an instance member. */ else { env->SetBooleanField( parent, fieldID, type.getBoolean() ); } return *this; }
/** * Creates a new JObject wrapping the existing jvalue. * */ JObject::JObject( jvalue value ) { setJavaJniValue( value ); }
/** * Sets the jobject for this JObject. * * This method is simply a convenience method for calling * setValue( jvalue ) with a jobject. * */ void JObject::setJavaJniObject( jobject object ) throw ( JNIException ) { jvalue value; value.l = object; setJavaJniValue( value ); }
JDouble::JDouble(JNIType _double) { jvalue value; value.d = _double; setJavaJniValue(value); }
JDouble::JDouble(jvalue value) { setJavaJniValue(value); }
JBoolean::JBoolean( jvalue value ) { setJavaJniValue( value ); }
JBoolean::JBoolean( jboolean boolean_ ) { jvalue value; value.z = boolean_; setJavaJniValue( value ); }
JLong::JLong( jvalue value ) { setJavaJniValue( value ); }
JLong::JLong( const JInt& int_ ) { jvalue value; value.j = int_.getInt(); setJavaJniValue( value ); }
JLong::JLong( jlong long_ ) { jvalue value; value.j = long_; setJavaJniValue( value ); }