public ItemType getSuperType(TypeHierarchy th) { if (javaClass == Object.class) { return BuiltInAtomicType.ANY_ATOMIC; } Class javaSuper = javaClass.getSuperclass(); if (javaSuper == null) { // this happens for an interface return BuiltInAtomicType.ANY_ATOMIC; } return new ExternalObjectType(javaSuper, config); }
public ItemType getSuperType(TypeHierarchy th) { if (javaClass == Object.class) { return BuiltInAtomicType.ANY_ATOMIC; } Class javaSuper = javaClass.getSuperclass(); if (javaSuper == null) { // this happens for an interface return BuiltInAtomicType.ANY_ATOMIC; } return new ExternalObjectType(javaSuper, config); }
public ItemType getItemType(TypeHierarchy th) { return new ExternalObjectType(Object.class, th.getConfiguration()); }
public ItemType getItemType(TypeHierarchy th) { return new ExternalObjectType(Object.class, th.getConfiguration()); }
/** * Determine the data type of the items in the expression, if possible * * @param th The TypeHierarchy. * @return for the default implementation: AnyItemType (not known) */ public ItemType getItemType(TypeHierarchy th) { if (typeLabel.equals(BuiltInAtomicType.ANY_ATOMIC)) { if (th == null) { throw new NullPointerException("No TypeHierarchy supplied"); } else { Configuration config = th.getConfiguration(); typeLabel = new ExternalObjectType(value.getClass(), config); } } return typeLabel; }
/** * Determine the data type of the items in the expression, if possible * * @param th The TypeHierarchy. * @return for the default implementation: AnyItemType (not known) */ public ItemType getItemType(TypeHierarchy th) { if (typeLabel.equals(BuiltInAtomicType.ANY_ATOMIC)) { if (th == null) { throw new NullPointerException("No TypeHierarchy supplied"); } else { Configuration config = th.getConfiguration(); typeLabel = new ExternalObjectType(value.getClass(), config); } } return typeLabel; }
return new WrapExternalObject(new ExternalObjectType(javaClass, config));
return new ExternalObjectType(resultClass, config);
return new ExternalObjectType(resultClass, config);
/** * Get the top-level schema type definition with a given fingerprint. * <p/> * This method is intended for internal use and for use by advanced * applications. (The SchemaType object returned cannot yet be considered * a stable API, and may be superseded when a JAXP API for schema information * is defined.) * * @param fingerprint the fingerprint of the schema type * @return the schema type , or null if there is none * with this name. */ public SchemaType getSchemaType(int fingerprint) { if (fingerprint < 1023) { return BuiltInType.getSchemaType(fingerprint); } if (getNamePool().getURI(fingerprint).equals(NamespaceConstant.JAVA_TYPE)) { try { Class namedClass = dynamicLoader.getClass(getNamePool().getLocalName(fingerprint), false, null); if (namedClass == null) { return null; } return new ExternalObjectType(namedClass, this); } catch (XPathException err) { return null; } } return null; }
grumble("Unknown Java class " + parts[1], "XPST0051"); return new ExternalObjectType(theClass, env.getConfiguration()); } else if (uri.equals(NamespaceConstant.DOT_NET_TYPE)) { return (AtomicType)Configuration.getPlatform().getExternalObjectType(env.getConfiguration(), uri, parts[1]);
grumble("Unknown Java class " + parts[1]); return new ExternalObjectType(theClass, env.getConfiguration()); } else if (uri.equals(NamespaceConstant.DOT_NET_TYPE)) { return (AtomicType)Configuration.getPlatform().getExternalObjectType(env.getConfiguration(), uri, parts[1]);