Description
Some things to decide first:
- Should this also include column number (which may not be used in all cases)?
- What should the interface be called (
Positionable
?)?
And some changes that could be made in the course of this:
- Rename
getLineNo()
togetLineNumber()
as follows:- Add both methods to the interface, with
getLineNo
marked as deprecated from 9.0, to be removed in 10.0; - The trait can handle forwarding
getLineNo
togetLineNumber
(or simply access the property), so that no changes to implementing classes are required, provided they can use the trait;
- Add both methods to the interface, with
- Use
null
to indicate 'no line number' instead of0
:- Again, the trait should be able to take care of the details, avoiding changes to implementing classes.