java.io.Serializable
, Expression
, Item
, ValueRepresentation
public final class RestrictedStringValue extends StringValue
StringValue.CharacterIterator
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
EMPTY_STRING, FALSE, length, SINGLE_SPACE, TRUE, value
EMPTY_CLASS_ARRAY
EMPTY_VALUE_ARRAY
Constructor | Description |
---|---|
RestrictedStringValue() |
Modifier and Type | Method | Description |
---|---|---|
AtomicValue |
convertPrimitive(BuiltInAtomicType requiredType,
boolean validate,
XPathContext context) |
Convert to target data type
|
ItemType |
getItemType(TypeHierarchy th) |
Return the type of the expression
|
static AtomicValue |
makeRestrictedString(java.lang.CharSequence value,
int type,
NameChecker checker) |
Factory method to create a restricted string value from a string
|
java.lang.String |
toString() |
Get string value.
|
checkPermittedContents, convert, convert, display, evaluateAsString, evaluateItem, getCardinality, getComponent, getImplementationMethod, getLength, getPrimitiveValue, getTypedValue, hasBuiltInType, iterate, process
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
codepointEquals, containsSurrogatePairs, contract, convertStringToAtomicType, convertStringToBuiltInType, convertToJava, effectiveBooleanValue, equals, expand, expand, getStringLength, getStringLength, getStringValue, getStringValueCS, hashCode, isZeroLength, iterateCharacters, makeStringValue
asItem, asIterator, asValue, convert, convertJavaObjectToXPath, getDependencies, getIterator, getParentExpression, getSpecialProperties, itemAt, iterateSubExpressions, makeQNameValue, optimize, promote, reduce, simplify, stringToNumber, typeCheck
public static AtomicValue makeRestrictedString(java.lang.CharSequence value, int type, NameChecker checker)
value
- the String value. Null is taken as equivalent to "".checker
- a NameChecker if validation is required,
null if the caller already knows that the value is validpublic ItemType getItemType(TypeHierarchy th)
getItemType
in interface Expression
getItemType
in class StringValue
th
- public AtomicValue convertPrimitive(BuiltInAtomicType requiredType, boolean validate, XPathContext context)
convertPrimitive
in class StringValue
requiredType
- an integer identifying the required atomic typecontext
- validate
- true if validation is required. If set to false, the caller guarantees that
the value is valid for the target data type, and that further validation is therefore not required.
Note that a validation failure may be reported even if validation was not requested.public java.lang.String toString()
AtomicValue
toString
in class StringValue