Class

org.apache.daffodil.dsom

CompiledExpression

Related Doc: package dsom

Permalink

abstract class CompiledExpression[+T <: AnyRef] extends ContentValueReferencedElementInfoMixin with Serializable

For the DFDL path/expression language, this provides the place to type check the expression (SDE if not properly typed) and provides the opportunity to compile it for efficient evaluation.

The schemaNode is the schema component where the path is being evaluated which due to scoping, may not be the same one where it is defined. It is the combination of a property valued expression with a schema node that defines an evaluation of an expression.

TODO: Consider - that an expression could be constant in some contexts, not others. E.g., if a DFDL schema defines a format where the delimiters are in a header record, then those are constant once you are parsing the body records. This does imply keeping around the xpath compiler at runtime, which may not be desirable from a code size perspective. Whether it's worth it to compile or not is also a question of how often each xpath will be repeated.

TODO: provide enough scope information for this to optimize.

Linear Supertypes
Serializable, Serializable, ContentValueReferencedElementInfoMixin, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompiledExpression
  2. Serializable
  3. Serializable
  4. ContentValueReferencedElementInfoMixin
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CompiledExpression(qName: NamedQName, valueForDebugPrinting: AnyRef)

    Permalink

Abstract Value Members

  1. abstract def contentReferencedElementInfos: Set[DPathElementCompileInfo]

    Permalink
  2. abstract def evaluate(state: ParseOrUnparseState): T

    Permalink
  3. abstract def evaluateForwardReferencing(state: ParseOrUnparseState, whereBlockedLocation: Suspension): Maybe[T]

    Permalink

    Use for outputValueCalc.

    Use for outputValueCalc.

    The whereBlockedLocation is modified via its block(...) method to indicate where the expression blocked (for forward progress checking).

  4. abstract def isConstant: Boolean

    Permalink
  5. abstract def isKnownNonEmpty: Boolean

    Permalink

    tells us if the property is non-empty.

    tells us if the property is non-empty. This is true if it is a constant non-empty expression (that is, is not ""), but it is also true if it is evaluated as a runtime expression that it is not allowed to return "".

    Issue: are there properties which are string-valued, and where "" can in fact be returned at run time? Assumed no. This was clarified in an errata to the DFDL spec.

  6. abstract def targetType: Kind

    Permalink

    The target type of the expression.

    The target type of the expression. This is the type that we want the expression to create.

  7. abstract def valueReferencedElementInfos: Set[DPathElementCompileInfo]

    Permalink
  8. abstract def constant: T

    Permalink

    used to obtain a constant value.

    used to obtain a constant value.

    isConstant must be true or this will throw.

    Annotations
    @deprecated
    Deprecated

    (Since version Code should just call evaluate(...) on an Evaluatable object.) 2016-02-18

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  10. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  15. lazy val prettyExpr: String

    Permalink

    Note use of the stringOf(v) below.

    Note use of the stringOf(v) below. Turns out x.toString creates some crappy printed representations, particularly for Array[Byte]. It prints a useless thing like "[@0909280". Use of stringOf prints "Array(....)".

  16. val qName: NamedQName

    Permalink
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. final def toBriefXML(depth: Int = 1): String

    Permalink
  19. def toString(): String

    Permalink
    Definition Classes
    CompiledExpression → AnyRef → Any
  20. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped