Package org.codehaus.jam

Examples of org.codehaus.jam.JAnnotationValue.asInt()


                out.println("marshal2Long(wireFormat, " + getter + ", dataOut, bs);");
            } else if (type.equals("String")) {
                out.println("writeString(" + getter + ", dataOut, bs);");
            } else if (type.equals("byte[]") || type.equals("ByteSequence")) {
                if (size != null) {
                    out.println("dataOut.write(" + getter + ", 0, " + size.asInt() + ");");
                } else {
                    out.println("if(bs.readBoolean()) {");
                    out.println("       DataStreamMarshaller.writeInt(" + getter + ".Length, dataOut);");
                    out.println("       dataOut.write(" + getter + ");");
                    out.println("    }");
View Full Code Here


                    out.println("       dataOut.write(" + getter + ");");
                    out.println("    }");
                }
            } else if (propertyType.isArrayType()) {
                if (size != null) {
                    out.println("marshalObjectArrayConstSize(wireFormat, " + getter + ", dataOut, bs, " + size.asInt() + ");");
                } else {
                    out.println("marshalObjectArray(wireFormat, " + getter + ", dataOut, bs);");
                }
            } else if (isThrowable(propertyType)) {
                out.println("marshalBrokerError(wireFormat, " + getter + ", dataOut, bs);");
View Full Code Here

                if (size == null) {
                    out.println("        bs->writeBoolean( " + getter + ".size() != 0 );" );
                    out.println("        rc += " + getter + ".size() == 0 ? 0 : (int)" + getter + ".size() + 4;");
                }
                else {
                    baseSize += size.asInt();
                }
            }
            else if (propertyType.isArrayType()) {
                if (size != null) {
                    out.println("        rc += tightMarshalObjectArrayConstSize1( wireFormat, " + getter + ", bs, " + size.asInt() + " );");
View Full Code Here

                    baseSize += size.asInt();
                }
            }
            else if (propertyType.isArrayType()) {
                if (size != null) {
                    out.println("        rc += tightMarshalObjectArrayConstSize1( wireFormat, " + getter + ", bs, " + size.asInt() + " );");
                }
                else {
                    out.println("        rc += tightMarshalObjectArray1( wireFormat, " + getter + ", bs );");
                }
            }
View Full Code Here

            else if (type.equals("String")) {
                out.println("        tightMarshalString2( " + getter + ", dataOut, bs );");
            }
            else if (type.equals("byte[]") || type.equals("ByteSequence")) {
                if (size != null) {
                    out.println("        dataOut->write( (const unsigned char*)(&" + getter + "[0]), 0, " + size.asInt() + " );");
                }
                else {
                    out.println("        if( bs->readBoolean() ) {");
                    out.println("            dataOut->writeInt( (int)" + getter + ".size() );");
                    out.println("            dataOut->write( (const unsigned char*)(&" + getter + "[0]), 0, (int)" + getter + ".size() );");
View Full Code Here

                    out.println("        }");
                }
            }
            else if (propertyType.isArrayType()) {
                if (size != null) {
                    out.println("        tightMarshalObjectArrayConstSize2( wireFormat, " + getter + ", dataOut, bs, " + size.asInt() + " );");
                }
                else {
                    out.println("        tightMarshalObjectArray2( wireFormat, " + getter + ", dataOut, bs );");
                }
            }
View Full Code Here

            else if( type.equals("String") ) {
                out.println("        looseMarshalString( " + getter + ", dataOut );");
            }
            else if( type.equals("byte[]") || type.equals("ByteSequence") ) {
                if(size != null) {
                    out.println("        dataOut->write( (const unsigned char*)(&" + getter + "[0]), 0, (int)" + size.asInt() + " );");
                }
                else {
                    out.println("        dataOut->write( " + getter + ".size() != 0 );");
                    out.println("        if( " + getter + ".size() != 0 ) {");
                    out.println("            dataOut->writeInt( (int)" + getter + ".size() );");
View Full Code Here

                    out.println("        }");
                }
            }
            else if( propertyType.isArrayType() ) {
                if (size != null) {
                    out.println("        looseMarshalObjectArrayConstSize( wireFormat, " + getter + ", dataOut, " + size.asInt() + " );");
                }
                else {
                    out.println("        looseMarshalObjectArray( wireFormat, " + getter + ", dataOut );");
                }
            }
View Full Code Here

            } else if (type.equals("java.lang.String")) {
                out.println("   ow_marshal1_string(buffer, object->" + propname + ");");
            } else {
                if (property.getType().isArrayType()) {
                    if (size != null) {
                        out.println("   SUCCESS_CHECK(ow_marshal1_DataStructure_array_const_size(buffer, object->" + propname + ", " + size.asInt() + "));");
                    } else {
                        out.println("   SUCCESS_CHECK(ow_marshal1_DataStructure_array(buffer, object->" + propname + "));");
                    }
                } else if (isThrowable(property.getType())) {
                    out.println("   SUCCESS_CHECK(ow_marshal1_throwable(buffer, object->" + propname + "));");
View Full Code Here

                out.println("   SUCCESS_CHECK(ow_byte_buffer_append_" + type + "(buffer, object->" + propname + "));");
            } else if (type.equals("long")) {
                out.println("   SUCCESS_CHECK(ow_marshal2_long(buffer, bitbuffer, object->" + propname + "));");
            } else if (type.equals("byte[]")) {
                if (size != null) {
                    out.println("   SUCCESS_CHECK(ow_marshal2_byte_array_const_size(buffer, object->" + propname + ", " + size.asInt() + "));");
                } else {
                    out.println("   SUCCESS_CHECK(ow_marshal2_byte_array(buffer, bitbuffer, object->" + propname + "));");
                }
            } else if (type.equals("org.apache.activeio.packet.ByteSequence")) {
                if (size != null) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.