Class

org.apache.daffodil.processors

CompileState

Related Doc: package processors

Permalink

final class CompileState extends ParseOrUnparseState

State used when compiling Evaluatable[T] objects So they don't require a "real" state.

This serves two purposes. First it lets us obey the regular API for evaluation, so we don't need one way to evaluate and another very similar thing for analyzing expressions to see if they are constant.

Second, it serves as a detector of when an expression is non-constant by blowing up when things inconsistent with constant-value are attempted to be extracted from the state. By "blow up" it throws a structured set of exceptions, typically children of InfosetException or VariableException.

Linear Supertypes
ParseOrUnparseState, SetProcessorMixin, FormatInfo, Logging, Identity, EncoderDecoderMixin, LocalBufferMixin, SavesErrorsAndWarnings, ThrowsSDE, StateForDebugger, State, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompileState
  2. ParseOrUnparseState
  3. SetProcessorMixin
  4. FormatInfo
  5. Logging
  6. Identity
  7. EncoderDecoderMixin
  8. LocalBufferMixin
  9. SavesErrorsAndWarnings
  10. ThrowsSDE
  11. StateForDebugger
  12. State
  13. AnyRef
  14. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CompileState(trd: RuntimeData, maybeDataProc: Maybe[DataProcessor])

    Permalink

Type Members

  1. final class LocalByteBuffer extends LocalBuffer[ByteBuffer]

    Permalink
    Definition Classes
    LocalBufferMixin
  2. final class LocalCharBuffer extends LocalBuffer[CharBuffer]

    Permalink
    Definition Classes
    LocalBufferMixin

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. def SDE(str: String, args: Any*): Nothing

    Permalink
    Definition Classes
    ParseOrUnparseState → SavesErrorsAndWarnings → ThrowsSDE
  5. final def SDE(th: Throwable): Nothing

    Permalink
    Definition Classes
    ThrowsSDE
  6. def SDEButContinue(str: String, args: Any*): Unit

    Permalink
    Definition Classes
    ParseOrUnparseState → SavesErrorsAndWarnings
  7. def SDW(warnID: WarnID, str: String, args: Any*): Unit

    Permalink
    Definition Classes
    ParseOrUnparseState → SavesErrorsAndWarnings
  8. def SDW(str: String, args: Any*): Unit

    Permalink
    Definition Classes
    ParseOrUnparseState
  9. def ThrowSDE: PartialFunction[Throwable, Nothing]

    Permalink
    Definition Classes
    ThrowsSDE
  10. var _processorStatus: ProcessorResult

    Permalink
    Attributes
    protected
    Definition Classes
    ParseOrUnparseState
  11. var _validationStatus: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    ParseOrUnparseState
  12. final def areLogging(lvl: Type): Boolean

    Permalink
    Definition Classes
    Logging
  13. def arrayPos: Long

    Permalink
  14. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  15. final def binaryFloatRep: BinaryFloatRep

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  16. def bitLimit0b: MaybeULong

    Permalink
  17. final def bitLimit1b: MaybeULong

    Permalink
    Definition Classes
    ParseOrUnparseState
  18. final def bitOrder: BitOrder

    Permalink

    Returns bit order.

    Returns bit order. If text, this is the bit order for the character set encoding. If binary, this is the bitOrder property value.

    Definition Classes
    ParseOrUnparseState → FormatInfo
  19. final def bitPos: Long

    Permalink
    Definition Classes
    ParseOrUnparseState
  20. def bitPos0b: Long

    Permalink
    Definition Classes
    CompileStateParseOrUnparseState
  21. final def bitPos1b: Long

    Permalink
    Definition Classes
    ParseOrUnparseState
  22. final def byteOrder: ByteOrder

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  23. final def bytePos: Long

    Permalink
    Definition Classes
    ParseOrUnparseStateStateForDebugger
  24. final def bytePos0b: Long

    Permalink
    Definition Classes
    ParseOrUnparseState
  25. final def bytePos1b: Long

    Permalink
    Definition Classes
    ParseOrUnparseState
  26. def checkBitOrder(): Unit

    Permalink

    Checks if the bit order change is legal.

    Checks if the bit order change is legal.

    For parsing we know the bitPos, so we can determine if we're at a byte boundary.

    For unparsing we may not know the absolute bitPos, so we cannot necessarily determine if the boundary is legal or not.

    If we know the absoluteBitPos we do the check (as for parsing).

    If we do not know the absoluteBitPos, then in that case, we split the DataOutputStream into original and buffered. The "check" then occurs when these DataOutputStreams are collapsed back together.

    So this "check" call, can have an important side effect when unparsing that queues up the check to be done in the future.

    Attributes
    protected
    Definition Classes
    CompileStateParseOrUnparseState
  27. def childPos: Long

    Permalink
  28. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. def copyStateForDebugger: TupleForDebugger

    Permalink
    Definition Classes
    ParseOrUnparseState
  30. def currentLocation: DataLocation

    Permalink
    Definition Classes
    CompileStateStateForDebuggerState
  31. def currentNode: Maybe[DINode]

    Permalink
    Definition Classes
    CompileStateParseOrUnparseState
  32. def dState: DState

    Permalink

    Used when evaluating expressions.

    Used when evaluating expressions. Holds state of expression during evaluation.

    Doesn't hold every bit of state - that is to say there's still the regular execution call stack, which keeps track of exactly where in the expression evaluation we are.

    Definition Classes
    ParseOrUnparseState
  33. var dataProc: Maybe[DataProcessor]

    Permalink
    Definition Classes
    ParseOrUnparseState
  34. def dataStream: Maybe[Nothing]

    Permalink
    Definition Classes
    CompileStateParseOrUnparseState
  35. final def decoder: BitsCharsetDecoder

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  36. var diagnostics: List[Diagnostic]

    Permalink
    Definition Classes
    ParseOrUnparseStateState
  37. def discriminator: Boolean

    Permalink
    Definition Classes
    StateForDebugger
  38. def doLogging(lvl: Type, msg: String, args: Seq[Any]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Logging
  39. final def encoder: BitsCharsetEncoder

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  40. final def encodingErrorPolicy: EncodingErrorPolicy

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  41. final def encodingMandatoryAlignmentInBits: Int

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  42. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  44. final def fillByte: Byte

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  45. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  47. def getContext(): ElementRuntimeData

    Permalink
    Definition Classes
    ParseOrUnparseState
  48. def getDecoder(charset: BitsCharset): BitsCharsetDecoder

    Permalink
    Definition Classes
    EncoderDecoderMixin
  49. def getDecoderInfo(charset: BitsCharset): DecoderInfo

    Permalink
    Definition Classes
    EncoderDecoderMixin
  50. def getEncoder(charset: BitsCharset): BitsCharsetEncoder

    Permalink
    Definition Classes
    EncoderDecoderMixin
  51. def getEncoderInfo(charset: BitsCharset): EncoderInfo

    Permalink
    Definition Classes
    EncoderDecoderMixin
  52. def getLogWriter(): LogWriter

    Permalink
    Definition Classes
    Logging
  53. final def getLoggingLevel(): Type

    Permalink
    Definition Classes
    Logging
  54. def groupPos: Long

    Permalink
  55. def hasInfoset: Boolean

    Permalink
    Definition Classes
    CompileStateParseOrUnparseState
  56. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  57. def infoset: DIElement

    Permalink
    Definition Classes
    CompileStateParseOrUnparseState
  58. final def isFixedWidthEncoding: Boolean

    Permalink
    Definition Classes
    FormatInfo
  59. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  60. final def jByteOrder: ByteOrder

    Permalink
    Definition Classes
    FormatInfo
  61. final def lengthInBits(str: String, bitsCharset: BitsCharset): Long

    Permalink
    Definition Classes
    EncoderDecoderMixin
  62. final macro def log(lvl: Type, msg: String, args: Any*): Unit

    Permalink
    Definition Classes
    Logging
  63. lazy val logID: String

    Permalink
    Definition Classes
    Logging → Identity
  64. var logLevel: Maybe[Type]

    Permalink
    Definition Classes
    Logging
  65. var logWriter: Maybe[LogWriter]

    Permalink
    Definition Classes
    Logging
  66. final def maybeCharWidthInBits: MaybeInt

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  67. def maybeERD: Maybe[ElementRuntimeData]

    Permalink
    Definition Classes
    ParseOrUnparseState
  68. final def maybeProcessor: Maybe[Processor]

    Permalink
    Definition Classes
    SetProcessorMixin
  69. final def maybeUTF16Width: Maybe[UTF16Width]

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  70. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  71. final def notYetImplemented(msg: String, args: Any*): Nothing

    Permalink
    Definition Classes
    ThrowsSDE
  72. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  74. def notifyDebugging(flag: Boolean): Unit

    Permalink

    The User API sets the debugger and debug on/off flag on the DataProcessor object.

    The User API sets the debugger and debug on/off flag on the DataProcessor object. When a PState or UState is created by the DataProcessor, the DataProcessor sets notifies the state object so that it can setup any debug-specific behaviors.

    Definition Classes
    CompileStateParseOrUnparseState
  75. def occursBoundsStack: MStackOfLong

    Permalink
    Definition Classes
    CompileStateParseOrUnparseState
  76. final def processor: Processor

    Permalink
    Definition Classes
    SetProcessorMixin
  77. def processorStatus: ProcessorResult

    Permalink
    Definition Classes
    ParseOrUnparseStateState
  78. final def replacingDecoder: BitsCharsetDecoder

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  79. final def reportingDecoder: BitsCharsetDecoder

    Permalink
    Definition Classes
    ParseOrUnparseState → FormatInfo
  80. final def resetFormatInfoCaches(): Unit

    Permalink

    Must call after all processors so as to recompute the formatInfo slots for the next parser - since the values could change.

    Must call after all processors so as to recompute the formatInfo slots for the next parser - since the values could change.

    Definition Classes
    ParseOrUnparseState
  81. final def schemaDefinitionError(str: String, args: Any*): Nothing

    Permalink
    Definition Classes
    ThrowsSDE
  82. def schemaDefinitionErrorButContinue(str: String, args: Any*): Unit

    Permalink
    Definition Classes
    SavesErrorsAndWarnings
  83. def schemaDefinitionErrorDueToPropertyValue(propertyName: String, propertyValue: String, propertyLocation: LookupLocation, otherPropertyLocation: LookupLocation, str: String, args: Any*): Nothing

    Permalink
    Definition Classes
    SavesErrorsAndWarnings
  84. final macro def schemaDefinitionUnless(testThatWillThrowIfFalse: Boolean, str: String, args: Any*): Unit

    Permalink
    Definition Classes
    ThrowsSDE
  85. macro def schemaDefinitionWarningUnless(warnID: WarnID, testThatWillWarnIfFalse: Boolean, str: String, args: Any*): Unit

    Permalink
    Definition Classes
    SavesErrorsAndWarnings
  86. macro def schemaDefinitionWarningWhen(warnID: WarnID, testThatWillWarnIfTrue: Boolean, str: String, args: Any*): Unit

    Permalink
    Definition Classes
    SavesErrorsAndWarnings
  87. final macro def schemaDefinitionWhen(testThatWillThrowIfTrue: Boolean, str: String, args: Any*): Unit

    Permalink
    Definition Classes
    ThrowsSDE
  88. def schemaFileLocation: SchemaFileLocation

    Permalink
    Definition Classes
    ParseOrUnparseState → ThrowsSDE
  89. final def setFailed(failureDiagnostic: Diagnostic): Unit

    Permalink
    Definition Classes
    ParseOrUnparseState
  90. def setLogWriter(lw: LogWriter): Unit

    Permalink
    Definition Classes
    Logging
  91. def setLoggingLevel(level: Type): Unit

    Permalink
    Definition Classes
    Logging
  92. final def setMaybeProcessor(mp: Maybe[Processor]): Unit

    Permalink
    Definition Classes
    SetProcessorMixin
  93. final def setProcessor(p: Processor): Unit

    Permalink

    Must be called on the state before any call to the I/O layer, as that will call back to get property-related information and that has to be obtained via the runtime data for the term - whether element or model group.

    Must be called on the state before any call to the I/O layer, as that will call back to get property-related information and that has to be obtained via the runtime data for the term - whether element or model group. The

    Definition Classes
    SetProcessorMixin
  94. def setSuccess(): Unit

    Permalink

    Important: If an error is being suppressed, you must call this to reset the state back so that the prior failure doesn't "last forever" past the point where it is being suppressed.

    Important: If an error is being suppressed, you must call this to reset the state back so that the prior failure doesn't "last forever" past the point where it is being suppressed.

    This happens, for example, in the debugger when it is evaluating expressions.

    Definition Classes
    ParseOrUnparseState
  95. def setVariableMap(newMap: VariableMap): Unit

    Permalink
    Definition Classes
    ParseOrUnparseState
  96. final def suppressDiagnosticAndSucceed(d: Diagnostic): Unit

    Permalink

    Used when errors are caught by interactive debugger expression evaluation.

    Used when errors are caught by interactive debugger expression evaluation. We don't want to accumulate the diagnostics that we're suppressing.

    Definition Classes
    ParseOrUnparseState
  97. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  98. def thisElement: DIElement

    Permalink
    Definition Classes
    CompileStateParseOrUnparseState
  99. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  100. final def toss(th: Throwable): Nothing

    Permalink
    Definition Classes
    ThrowsSDE
  101. final def truncateToBits(str: String, bitsCharset: BitsCharset, nBits: Long): String

    Permalink
    Definition Classes
    EncoderDecoderMixin
  102. val tunable: DaffodilTunables

    Permalink
    Definition Classes
    ParseOrUnparseState
  103. def validationError(msg: String, args: Any*): Unit

    Permalink
    Definition Classes
    ParseOrUnparseState
  104. def validationErrorNoContext(cause: Throwable): Unit

    Permalink
    Definition Classes
    ParseOrUnparseState
  105. def validationStatus: Boolean

    Permalink
    Definition Classes
    ParseOrUnparseStateState
  106. var variableBox: VariableBox

    Permalink
    Attributes
    protected
    Definition Classes
    ParseOrUnparseState
  107. def variableMap: VariableMap

    Permalink

    Variable map provides access to variable bindings.

    Variable map provides access to variable bindings.

    Definition Classes
    ParseOrUnparseState
  108. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  111. final def whichBit0b: Long

    Permalink
    Definition Classes
    ParseOrUnparseState
  112. final lazy val withLocalByteBuffer: LocalStack[LocalByteBuffer]

    Permalink
    Definition Classes
    LocalBufferMixin
  113. final lazy val withLocalCharBuffer: LocalStack[LocalCharBuffer]

    Permalink
    Definition Classes
    LocalBufferMixin
  114. macro def withLoggingLevel[S](newLevel: Type)(body: ⇒ S): Unit

    Permalink
    Definition Classes
    Logging

Inherited from ParseOrUnparseState

Inherited from SetProcessorMixin

Inherited from FormatInfo

Inherited from Logging

Inherited from Identity

Inherited from EncoderDecoderMixin

Inherited from LocalBufferMixin

Inherited from SavesErrorsAndWarnings

Inherited from ThrowsSDE

Inherited from StateForDebugger

Inherited from State

Inherited from AnyRef

Inherited from Any

Ungrouped