You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is a method AnnotationBag::getAsArray()
That's very convenient when we want to make sure to retrieve an array.
What's about adding a method AnnotationBag::getAsString() or AnnotationBag::getAsRawString()
to get the annotation value as a string. Even if it's in array or object annotation,
we sometime want to get this value as the raw original string.
We could do that by changing the parser. But sometime we can need both of the ouput
depending on the annotation name.
What's your opinion ?
The text was updated successfully, but these errors were encountered:
For v3 it would be ok as long as it's not a huge BC break on the AnnotationsBag public API, which I believe is perfectly possible to do with internal changes only.
That would actually require to change the constructor and the set methods of the annotation bag, because we need to pass both of the original string and the parsed one.
An other approach would be to pass only the raw string, and the annotationBag would be responsible to transform the raw string into the good type
Currently there is a method
AnnotationBag::getAsArray()
That's very convenient when we want to make sure to retrieve an array.
What's about adding a method
AnnotationBag::getAsString()
orAnnotationBag::getAsRawString()
to get the annotation value as a string. Even if it's in array or object annotation,
we sometime want to get this value as the raw original string.
We could do that by changing the parser. But sometime we can need both of the ouput
depending on the annotation name.
What's your opinion ?
The text was updated successfully, but these errors were encountered: