예제 #1
0
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;
}
예제 #2
0
/**
 * Creates a new JObject wrapping the existing jvalue.
 *
 */
JObject::JObject( jvalue value ) {
  setJavaJniValue( value );
}
예제 #3
0
/**
 * 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 );
}
예제 #4
0
JDouble::JDouble(JNIType _double)
{
  jvalue value;
  value.d = _double;
  setJavaJniValue(value);
}
예제 #5
0
JDouble::JDouble(jvalue value)
{
  setJavaJniValue(value);
}
예제 #6
0
JBoolean::JBoolean( jvalue value ) {
  setJavaJniValue( value );
}
예제 #7
0
JBoolean::JBoolean( jboolean boolean_ ) {
  jvalue value;
  value.z = boolean_;
  setJavaJniValue( value );
}
예제 #8
0
JLong::JLong( jvalue value ) {
  setJavaJniValue( value );
}
예제 #9
0
JLong::JLong( const JInt& int_ ) {
  jvalue value;
  value.j = int_.getInt();
  setJavaJniValue( value );
}
예제 #10
0
JLong::JLong( jlong long_ ) {
  jvalue value;
  value.j = long_;
  setJavaJniValue( value );
}