in messages/src/main/java/com/epam/deltix/timebase/messages/schema/StreamMessage.java [388:444]
public StreamMessage copyFrom(RecordInfo template) {
super.copyFrom(template);
if (template instanceof StreamMessage) {
StreamMessage t = (StreamMessage)template;
if (t.hasKey()) {
if (hasKey() && getKey() instanceof StringBuilder) {
((StringBuilder)getKey()).setLength(0);
} else {
setKey(new StringBuilder());
}
((StringBuilder)getKey()).append(t.getKey());
} else {
nullifyKey();
}
if (t.hasName()) {
if (hasName() && getName() instanceof StringBuilder) {
((StringBuilder)getName()).setLength(0);
} else {
setName(new StringBuilder());
}
((StringBuilder)getName()).append(t.getName());
} else {
nullifyName();
}
if (t.hasDescription()) {
if (hasDescription() && getDescription() instanceof StringBuilder) {
((StringBuilder)getDescription()).setLength(0);
} else {
setDescription(new StringBuilder());
}
((StringBuilder)getDescription()).append(t.getDescription());
} else {
nullifyDescription();
}
if (t.hasTopTypes()) {
if (!hasTopTypes()) {
setTopTypes(new ObjectArrayList<TypeDescriptor>(t.getTopTypes().size()));
} else {
getTopTypes().clear();
}
for (int i = 0; i < t.getTopTypes().size(); ++i) ((ObjectArrayList<TypeDescriptor>)getTopTypes()).add((TypeDescriptor)t.getTopTypes().get(i).clone());
} else {
nullifyTopTypes();
}
if (t.hasAllTypes()) {
if (!hasAllTypes()) {
setAllTypes(new ObjectArrayList<UniqueDescriptor>(t.getAllTypes().size()));
} else {
getAllTypes().clear();
}
for (int i = 0; i < t.getAllTypes().size(); ++i) ((ObjectArrayList<UniqueDescriptor>)getAllTypes()).add((UniqueDescriptor)t.getAllTypes().get(i).clone());
} else {
nullifyAllTypes();
}
}
return this;
}