| Returns a read-only list of
Location that indicates
where in the source code the problem has happened.
Normally, an annotation error happens on one particular
annotation, in which case this method returns a list that
contains another list, which in turn contains the location
information that leads to the error location
(IOW, [ [pos1,pos2,...,posN] ])
Sometimes, an error could occur because of two or more conflicting
annotations, in which case this method returns a list
that contains many lists, where each list contains
the location information that leads to each of the conflicting
annotations
(IOW, [ [pos11,pos12,...,pos1N],[pos21,pos22,...,pos2M], ... ])
Yet some other time, the runtime can fail to provide any
error location, in which case this method returns an empty list.
(IOW, []). We do try hard to make sure this won't happen,
so please let us know
if you see this behavior.
Each error location is identified not just by one
Location object, but by a sequence of
Location s that shows why
the runtime is led to the place of the error.
This list is sorted such that the most specific
Location comes
to the first in the list, sort of like a stack trace.
For example, suppose you specify class Foo to
JAXBContext ,
Foo derives from Bar, Bar has a field pea
that points to Zot, Zot contains a gum
property, and this property has an errornous annotation.
Then when this exception is thrown, the list of
Location s
will look something like
[ "gum property", "Zot class", "pea property", "Bar class", "Foo class" ]
can be empty when no source position is available,but never null. The returned list will never containnull nor length-0 List. |