Package net.sf.saxon.expr
Class StringLiteral
java.lang.Object
net.sf.saxon.expr.Expression
net.sf.saxon.expr.Literal
net.sf.saxon.expr.StringLiteral
- All Implemented Interfaces:
ExportAgent,Locatable,IdentityComparable,Traceable
Subclass of Literal used specifically for string literals, as this is a common case
-
Nested Class Summary
Nested classes/interfaces inherited from class net.sf.saxon.expr.Literal
Literal.LiteralElaborator -
Field Summary
Fields inherited from class net.sf.saxon.expr.Expression
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_COST, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UPDATE_METHOD, WATCH_METHOD -
Constructor Summary
ConstructorsConstructorDescriptionStringLiteral(String value) Create a StringLiteral that wraps a StringStringLiteral(UnicodeString value) Create a StringLiteral that wraps any UnicodeStringStringLiteral(StringValue value) Create a StringLiteral that wraps a StringValue -
Method Summary
Modifier and TypeMethodDescriptioncopy(RebindingMap rebindings) Copy an expression.Get the value represented by this LiteralGet the string represented by this StringLiteral, as a UnicodeStringbooleanisInstance(SequenceType req, TypeHierarchy th) Test whether the value is an instance of a supplied typeGet the string represented by this StringLiteral, as a StringProduce a short string identifying the expression for use in error messagesMethods inherited from class net.sf.saxon.expr.Literal
computeCardinality, computeHashCode, computeSpecialProperties, effectiveBooleanValue, equals, evaluateAsString, evaluateItem, export, exportAtomicValue, exportValue, getDependencies, getElaborator, getExpressionName, getImplementationMethod, getItemType, getNetCost, getStaticUType, getStreamerName, hasEffectiveBooleanValue, isAtomic, isConstantBoolean, isConstantOne, isConstantZero, isEmptySequence, isSubtreeExpression, isVacuousExpression, iterate, iterate, makeEmptySequence, makeLiteral, makeLiteral, optimize, process, supportsLazyEvaluation, toPattern, toString, typeCheckMethods inherited from class net.sf.saxon.expr.Expression
adoptChildExpression, allowExtractingCommonSubexpressions, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, dispatchTailCall, dynamicError, explain, getCardinality, getConfiguration, getCost, getEvaluationMethod, getExtraProperty, getIntrinsicDependencies, getLocalRetainedStaticContext, getLocation, getObjectName, getPackageData, getParentExpression, getProperties, getProperty, getRetainedStaticContext, getScopingExpression, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStaticType, getTracingTag, hasCompatibleStaticContext, hashCode, hasSpecialProperty, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isEqual, isIdentical, isInstruction, isLiftable, isMultiThreaded, isStaticPropertiesKnown, isUpdatingExpression, makeElaborator, markTailFunctionCalls, operandList, operands, operandSparseList, optimizeChildren, prepareForStreaming, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setExtraProperty, setFiltered, setFlattened, setLocation, setParentExpression, setRetainedStaticContext, setRetainedStaticContextLocally, setRetainedStaticContextThoroughly, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, typeCheckChildren, typeError, unordered, verifyParentPointers, warning, withLocationMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface net.sf.saxon.trace.Traceable
gatherProperties
-
Constructor Details
-
StringLiteral
Create a StringLiteral that wraps a StringValue- Parameters:
value- the StringValue
-
StringLiteral
Create a StringLiteral that wraps any UnicodeString- Parameters:
value- the UnicodeString to be wrapped
-
StringLiteral
Create a StringLiteral that wraps a String- Parameters:
value- the String to be wrapped
-
-
Method Details
-
getGroundedValue
Get the value represented by this Literal- Overrides:
getGroundedValuein classLiteral- Returns:
- the constant value
-
getUnicodeString
Get the string represented by this StringLiteral, as a UnicodeString- Returns:
- the underlying string
-
stringify
Get the string represented by this StringLiteral, as a String- Returns:
- the underlying string
-
copy
Description copied from class:LiteralCopy an expression. This makes a deep copy. -
isInstance
Test whether the value is an instance of a supplied type- Overrides:
isInstancein classLiteral- Parameters:
req- the required typeth- the type hierarchy cache- Returns:
- true if the value is (strictly) an instance of the type, in the sense of the "instance of" operator
-
toShortString
Produce a short string identifying the expression for use in error messages- Overrides:
toShortStringin classLiteral- Returns:
- a short string, sufficient to identify the expression
-