MyStringField stringField = new MyStringField("string");
MyPriceField priceField = new MyPriceField(14.54);

message.setField(stringField);
message.setField(priceField);

message.getField(stringField);
message.getField(priceField);