1 package net.sf.saxon.type; 2 import net.sf.saxon.om.Item; 3 import net.sf.saxon.om.NamePool; 4 5 import java.io.Serializable ; 6 7 8 11 12 public class AnyItemType implements ItemType, Serializable { 13 14 private AnyItemType(){}; 15 16 private static AnyItemType theInstance = new AnyItemType(); 17 18 21 22 public static AnyItemType getInstance() { 23 return theInstance; 24 } 25 26 27 32 33 public boolean matchesItem(Item item) { 34 return true; 35 } 36 37 public ItemType getSuperType() { 38 return null; 39 } 40 41 49 50 public ItemType getPrimitiveItemType() { 51 return this; 52 } 53 54 public int getPrimitiveType() { 55 return Type.ITEM; 56 } 57 58 public AtomicType getAtomizedItemType() { 59 return Type.ANY_ATOMIC_TYPE; 60 } 61 62 public String toString() { 63 return "item()"; 64 } 65 66 public String toString(NamePool pool) { 67 return "item()"; 68 } 69 70 73 74 public int hashCode() { 75 return "AnyItemType".hashCode(); 76 } 77 78 } 79 80 | Popular Tags |