Evan Root
Evan Root

Reputation: 279

What does @Tag Annotation does

I am working on a project where the variables of classes have @Tag annotation above it. What is its function?

It looks like this

@Tag(10)
private GroupNavigationSRO groups;

@Tag(16)
private String redirectedQuery;

@Tag(17)
private GetGuidedSearchResponse guidedSearchResponse ;

I tried searching the internet but couldn't find any relevant answer

Upvotes: 2

Views: 8292

Answers (1)

Stephen C
Stephen C

Reputation: 718826

I suspect that this is the io.protostuff.Tag class defined by the "protostuff" library. If so, then this page explains that @Tag(number) is an explicit way of setting the field numbers in a serialization.

Upvotes: 2

Related Questions