Пример #1
0
static int l_Message_setType(lua_State *L) {
    auto message = lua_tomessage(L, 1);
    stringType type = luaL_checkstring(L, 2);
    message->setTypeString(type);
    
    return 0;
}
Пример #2
0
 JObjectStreamField::JObjectStreamField(JString name,JClass* type,jbool unshared):JObject(getClazz()){
     this->name=new JString(name);
     this->type=type;
     this->unshared=unshared;
     this->signature=new JString(type->getSignature());
     this->field=NULL;
     setTypeString();
 }
Пример #3
0
 JObjectStreamField::JObjectStreamField():JObject(getClazz()){
     this->name=NULL;
     this->signature=NULL;
     this->type=NULL;
     this->unshared=false;
     this->field=NULL;
     setTypeString();
 }
Пример #4
0
 JObjectStreamField::JObjectStreamField(JField* field,jbool unshared,jbool showType):JObject(getClazz()){
     this->field=field;
     this->unshared=unshared;
     this->name=field->getName();
     JClass* ftype=field->getType();
     type=(showType||ftype->isPrimitive()?ftype:JObject::getClazz());
     signature=new JString(ftype->getSignature());
     setTypeString();
 }
Пример #5
0
 JObjectStreamField::JObjectStreamField(JString name,JString signature,jbool unshared):JObject(getClazz()){
     this->name=new JString(name);
     this->signature=new JString(signature);
     this->unshared=unshared;
     this->field=NULL;
     switch(signature.charAt(0)){
         case 'Z':
             type = JPrimitiveBoolean::getClazz();
             break;
         case 'B':
             type = JPrimitiveByte::getClazz();
             break;
         case 'C':
             type = JPrimitiveChar::getClazz();
             break;
         case 'S':
             type = JPrimitiveShort::getClazz();
             break;
         case 'I':
             type = JPrimitiveInt::getClazz();
             break;
         case 'J':
             type = JPrimitiveLong::getClazz();
             break;
         case 'F':
             type = JPrimitiveFloat::getClazz();
             break;
         case 'D':
             type = JPrimitiveDouble::getClazz();
             break;
         case 'L':
         case '[':
             type = JObject::getClazz();
             break;
         default:
             throw new JIllegalArgumentException("illegal signature");
     }
     setTypeString();
 }