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); }
/** * Analyze an expression to see whether the expression is capable of delivering a value of this * type. * * @param expression the expression that delivers the content * @param kind the node kind whose content is being delivered: {@link Type#ELEMENT}, * {@link Type#ATTRIBUTE}, or {@link Type#DOCUMENT} * @param env the static evaluation context * @throws net.sf.saxon.trans.XPathException * if the expression will never deliver a value of the correct type */ public void analyzeContentExpression(Expression expression, int kind, StaticContext env) throws XPathException { analyzeContentExpression(this, expression, env, kind); }
/** * Returns the base type that this type inherits from. This method can be used to get the * base type of a type that is known to be valid. * If this type is a Simpletype that is a built in primitive type then null is returned. * * @return the base type. * @throws IllegalStateException if this type is not valid. */ public SchemaType getKnownBaseType() { return getBaseType(); }
Class ext = ((ExternalObjectType)itemType).getJavaClass(); if (required.isAssignableFrom(ext)) { return 10;
/** * Produce a representation of this type name for use in error messages. * Where this is a QName, it will use conventional prefixes */ public String toString(NamePool pool) { return getDisplayName(); }
/** * Test whether this is the same type as another type. They are considered to be the same type * if they are derived from the same type definition in the original XML representation (which * can happen when there are multiple includes of the same file) */ public boolean isSameType(SchemaType other) { return (other.getFingerprint() == getFingerprint()); }
public String getDisplayName() { return toString(); }
} else if (t1 instanceof ExternalObjectType) { if (t2 instanceof ExternalObjectType) { return ((ExternalObjectType)t1).getRelationship((ExternalObjectType)t2); } else if (((AtomicType)t2).getFingerprint() == StandardNames.XS_ANY_ATOMIC_TYPE) { return SUBSUMED_BY;
Class ext = ((ExternalObjectType)itemType).getJavaClass(); if (required.isAssignableFrom(ext)) { return 10;
/** * Produce a representation of this type name for use in error messages. * Where this is a QName, it will use conventional prefixes */ public String toString(NamePool pool) { return getDisplayName(); }
/** * Test whether this is the same type as another type. They are considered to be the same type * if they are derived from the same type definition in the original XML representation (which * can happen when there are multiple includes of the same file) */ public boolean isSameType(SchemaType other) { return (other.getFingerprint() == getFingerprint()); }
public String getDisplayName() { return toString(); }
} else if (t1 instanceof ExternalObjectType) { if (t2 instanceof ExternalObjectType) { return ((ExternalObjectType)t1).getRelationship((ExternalObjectType)t2); } else if (((AtomicType)t2).getFingerprint() == StandardNames.XS_ANY_ATOMIC_TYPE) { return SUBSUMED_BY;
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); }
Class theClass = ((ExternalObjectType)requiredItemType).getJavaClass(); if (theClass.isAssignableFrom(object.getClass())) { return new ObjectValue(object, (ExternalObjectType)requiredItemType);
public String getDescription() { return getDisplayName(); }
/** * Returns the base type that this type inherits from. This method can be used to get the * base type of a type that is known to be valid. * If this type is a Simpletype that is a built in primitive type then null is returned. * * @return the base type. * @throws IllegalStateException if this type is not valid. */ public SchemaType getKnownBaseType() { return getBaseType(); }
/** * Analyze an expression to see whether the expression is capable of delivering a value of this * type. * * @param expression the expression that delivers the content * @param kind the node kind whose content is being delivered: {@link Type#ELEMENT}, * {@link Type#ATTRIBUTE}, or {@link Type#DOCUMENT} * @param env the static evaluation context * @throws net.sf.saxon.trans.XPathException * if the expression will never deliver a value of the correct type */ public void analyzeContentExpression(Expression expression, int kind, StaticContext env) throws XPathException { analyzeContentExpression(this, expression, env, kind); }
public ItemType getItemType(TypeHierarchy th) { return new ExternalObjectType(Object.class, th.getConfiguration()); }
Class theClass = ((ExternalObjectType)requiredItemType).getJavaClass(); if (theClass.isAssignableFrom(object.getClass())) { return new ObjectValue(object, (ExternalObjectType)requiredItemType);