Could I quote a serialization method in 'Gradle' in my paper to illustrate some of the characteristics of the code syntax?

I will mark the source of the code segment.
Below is the code snippet I am talking about(gradle/AbstractCollectionSerializer.java at 5ec3f672ed600a86280be490395d70b7bc634862 · gradle/gradle · GitHub):
‘’’
public void write(Encoder encoder, C value) throws Exception {
encoder.writeInt(value.size());
for (T t : value) {
entrySerializer.write(encoder, t);
}
}
‘’’