in serialization/src/main/java/com/twitter/serial/serializer/CoreSerializers.java [553:565]
private static void serializeStatelessObject(@NotNull SerializationContext context,
@NotNull SerializerOutput output, @NotNull Object object)
throws IOException {
if (context.isDebug()) {
try {
object.getClass().getConstructor();
} catch (NoSuchMethodException e) {
throw new IllegalStateException(
"Class has no default constructor: " + object.getClass());
}
}
output.writeString(object.getClass().getName());
}