public class AnnotationList extends Object implements Iterable<Annotation>
| Modifier and Type | Field and Description |
|---|---|
static AnnotationList |
EMPTY
An empty annotation list
|
| Constructor and Description |
|---|
AnnotationList(List<Annotation> list) |
| Modifier and Type | Method and Description |
|---|---|
void |
check(Configuration config,
String where)
Check an annotation list for internal consistency (e.g.
|
boolean |
equals(Object other) |
AnnotationList |
filterByNamespace(String ns)
Filter the annotation list by the namespace URI part of the annotation name
|
Annotation |
get(int i)
Get the i'th annotation in the list (counting from zero)
|
int |
hashCode() |
boolean |
includes(String localName)
Ask whether a list of annotations contains an annotation with a given local name
|
boolean |
includes(StructuredQName name)
Ask whether a list of annotations contains an annotation with a given name
|
boolean |
isEmpty()
Ask whether the list of annotations is empty
|
Iterator<Annotation> |
iterator()
Returns an iterator over a set of elements of type T.
|
static AnnotationList |
singleton(Annotation ann)
Construct an annotation list containing a single annotation
|
int |
size()
The number of annotations in the list
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic static AnnotationList EMPTY
public AnnotationList(List<Annotation> list)
public static AnnotationList singleton(Annotation ann)
ann - the single annotation in the annotation listpublic void check(Configuration config, String where) throws XPathException
where - the context where the list appears: one of "DF" (declare function), "DV" (declare variable),
"IF" (inline function declaration), "FT" (function test)XPathException - if the annotation list is not internally consistentpublic AnnotationList filterByNamespace(String ns)
ns - the namespace URI requiredpublic Iterator<Annotation> iterator()
iterator in interface Iterable<Annotation>public boolean isEmpty()
public int size()
public Annotation get(int i)
i - the index of the required annotation (counting from zero)public boolean includes(StructuredQName name)
name - the given namepublic boolean includes(String localName)
localName - the given local name