Package org.eclipse.wst.xml.xpath2.processor.internal.utils


org.eclipse.wst.xml.xpath2.processor.internal.utils
Class TypePromoter



public class TypePromoter
extends java.lang.Object
Generic type promoter for handling subtype substitution and type promotions for functions and operators.

Constructor Summary

TypePromoter()

Method Summary

public org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicTypeatomize(org.eclipse.wst.xml.xpath2.api.Item at)
    
protected booleancheckCombination(java.lang.Class newType)
    
public voidconsiderSequence(org.eclipse.wst.xml.xpath2.api.ResultSequence sequenceToConsider)
    
public voidconsiderType(java.lang.Class typeToConsider)
    
public voidconsiderTypes(java.util.Collection typesToConsider)
    
public voidconsiderValue(org.eclipse.wst.xml.xpath2.api.Item at)
    
public org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicTypedoPromote(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType value)
    
public java.lang.ClassgetTargetType()
    
public org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicTypepromote(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType value)
    
protected voidsetTargetType(java.lang.Class class1)
    
protected java.lang.Classsubstitute(java.lang.Class typeToConsider)
    

Constructor Detail

TypePromoter

public TypePromoter()


Methods Detail

atomize

public org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType atomize(org.eclipse.wst.xml.xpath2.api.Item at)

Parameters

at

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType


checkCombination

protected boolean checkCombination(java.lang.Class newType)

Parameters

newType

Returns

boolean


considerSequence

public void considerSequence(org.eclipse.wst.xml.xpath2.api.ResultSequence sequenceToConsider)

Parameters

sequenceToConsider

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError


considerType

public void considerType(java.lang.Class typeToConsider)

Parameters

typeToConsider

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError


considerTypes

public void considerTypes(java.util.Collection typesToConsider)

Parameters

typesToConsider

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError


considerValue

public void considerValue(org.eclipse.wst.xml.xpath2.api.Item at)

Parameters

at

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError


doPromote

public org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType doPromote(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType value)

Parameters

value

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError


getTargetType

public java.lang.Class getTargetType()

Returns

java.lang.Class


promote

public org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType promote(org.eclipse.wst.xml.xpath2.processor.internal.types.AnyType value)

Parameters

value

Returns

org.eclipse.wst.xml.xpath2.processor.internal.types.AnyAtomicType

Throws:

org.eclipse.wst.xml.xpath2.processor.DynamicError


setTargetType

protected void setTargetType(java.lang.Class class1)

Parameters

class1


substitute

protected java.lang.Class substitute(java.lang.Class typeToConsider)

Parameters

typeToConsider - The

Returns

java.lang.Class - The supertype to treat it as (i.e. if a xs:nonNegativeInteger is treated as xs:number)