private CharSequence generatePrimitivePropertyEncode(
        final String containingClassName,
        final String propertyName,
        final CharSequence accessOrderListenerCall,
        final Token typeToken,
        final String indent)
    {
        final Encoding encoding = typeToken.encoding();
        final String javaTypeName = javaTypeName(encoding.primitiveType());
        final int offset = typeToken.offset();
        final String byteOrderStr = byteOrderString(encoding);

        return String.format(
            "\n" +
            indent + "    public %s %s(final %s value)\n" +
            indent + "    {\n" +
            "%s" +
            indent + "        %s;\n" +
            indent + "        return this;\n" +
            indent + "    }\n\n",
            formatClassName(containingClassName),
            formatPropertyName(propertyName),
            javaTypeName,
            accessOrderListenerCall,
            generatePut(encoding.primitiveType(), "offset + " + offset, "value", byteOrderStr));
    }
\n" +
                "     * Field presence indication. Can be optional, required, or constant.\n" +
                "
sbe-tool/src/main/java/uk/co/real_logic/sbe/generation/java/JavaGenerator.java