Package

sweet.delights.parsing

annotations

Permalink

package annotations

Visibility
  1. Public
  2. All

Type Members

  1. case class Conditional(func: (Int) ⇒ Boolean) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies a condition on a field to be parsed.

    Specifies a condition on a field to be parsed. This annotation is only taken into account for repeatable types. The function provided is given the occurence index, starting from 0, in which the field is being parsed. If the function applied on the index return true, then the field is parsed. Otherwise, the field is ignored.

    This annotation is an experiment and may be removed in the future.

    func

    a function on a index

  2. case class Format(value: String) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies the format of a leaf field.

    Specifies the format of a leaf field.

    value

    the pattern

  3. case class FormatParam(value: String) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies the format of a leaf field through a parameter.

    Specifies the format of a leaf field through a parameter.

    value

    the parameter name

  4. case class Ignore(value: Boolean) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies to ignore (or not) the parsing of a field.

    Specifies to ignore (or not) the parsing of a field.

    value

    true to ignore, false to parse

  5. case class IgnoreParam(value: String) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies to ignore (or not) the parsing of a field based on a named parameter.

    Specifies to ignore (or not) the parsing of a field based on a named parameter.

    value

    parameter name

  6. case class Length(value: Int) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies a fixed width for a field to be parsed.

    Specifies a fixed width for a field to be parsed.

    value

    fixed-width length in number of characters

  7. case class LengthParam(value: String) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies a parameterized width for a field to be parsed.

    Specifies a parameterized width for a field to be parsed. The parameter name can be provided by calling: scala Parser.parse[T](params: Map[String, Any]) _

    value

    the name of the parameter.

  8. case class Lenient() extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies to ignore any exception when parsing a leaf type.

    Specifies to ignore any exception when parsing a leaf type. The value is set to its default.

  9. case class Options(trim: Boolean = false, debug: Boolean = false) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Case class level options for parsing.

    Case class level options for parsing.

    trim

    if true, strings are trimmed otherwise left unchanged

    debug

    if true, print debugging info to std otherwise nothing

  10. case class Regex(value: String) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies a regex to parse a string, effectively making it variable-length.

    Specifies a regex to parse a string, effectively making it variable-length.

    value

    a regular expression

  11. case class Repetition(value: Int) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies a fixed number of repetitions for lists.

    Specifies a fixed number of repetitions for lists.

    value

    a number of repetitions

  12. case class TrailingSkip(value: Int) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies the number of characters to skip after a successful string parsing.

    Specifies the number of characters to skip after a successful string parsing.

    value

    number of characters

  13. case class TrueIf(value: String) extends Annotation with StaticAnnotation with Product with Serializable

    Permalink

    Specifies the true value of a boolean field.

    Specifies the true value of a boolean field.

    value

    the value should evaluate to true

Ungrouped