t

org.ekrich.config

ConfigOrigin

trait ConfigOrigin extends AnyRef

Represents the origin (such as filename and line number) of a ConfigValue for use in error messages. Obtain the origin of a value with ConfigValue#origin. Exceptions may have an origin, see ConfigException#origin, but be careful because ConfigException.origin() may return null.

It's best to use this interface only for debugging; its accuracy is "best effort" rather than guaranteed, and a potentially-noticeable amount of memory could probably be saved if origins were not kept around, so in the future there might be some option to discard origins.

Do not implement this interface; it should only be implemented by the config library. Arbitrary implementations will not work because the library internals assume a specific concrete implementation. Also, this interface is likely to grow new methods over time, so third-party implementations will break.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ConfigOrigin
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def comments: List[String]

    Returns any comments that appeared to "go with" this place in the file.

    Returns any comments that appeared to "go with" this place in the file. Often an empty list, but never null. The details of this are subject to change, but at the moment comments that are immediately before an array element or object field, with no blank line after the comment, "go with" that element or field.

    returns

    any comments that seemed to "go with" this origin, empty list if none

  2. abstract def description: String

    Returns a string describing the origin of a value or exception.

    Returns a string describing the origin of a value or exception. This will never return null.

    returns

    string describing the origin

  3. abstract def filename: String

    Returns a filename describing the origin.

    Returns a filename describing the origin. This will return null if the origin was not a file.

    returns

    filename of the origin or null

  4. abstract def lineNumber: Int

    Returns a line number where the value or exception originated.

    Returns a line number where the value or exception originated. This will return -1 if there's no meaningful line number.

    returns

    line number or -1 if none is available

  5. abstract def resource: String

    Returns a classpath resource name describing the origin.

    Returns a classpath resource name describing the origin. This will return null if the origin was not a classpath resource.

    returns

    resource name of the origin or null

  6. abstract def url: URL

    Returns a URL describing the origin.

    Returns a URL describing the origin. This will return null if the origin has no meaningful URL.

    returns

    url of the origin or null

  7. abstract def withComments(comments: List[String]): ConfigOrigin

    Returns a ConfigOrigin based on this one, but with the given comments.

    Returns a ConfigOrigin based on this one, but with the given comments. Does not modify this instance or any ConfigValues with this origin (since they are immutable). To set the returned origin to a ConfigValue, use ConfigValue#withOrigin.

    Note that when the given comments are equal to the comments on this object, a new instance may not be created and this is returned directly.

    comments

    the comments used on the returned origin

    returns

    the ConfigOrigin with the given comments

    Since

    1.3.0

  8. abstract def withLineNumber(lineNumber: Int): ConfigOrigin

    Returns a ConfigOrigin based on this one, but with the given line number.

    Returns a ConfigOrigin based on this one, but with the given line number. This origin must be a FILE, URL or RESOURCE. Does not modify this instance or any ConfigValues with this origin (since they are immutable). To set the returned origin to a ConfigValue, use ConfigValue#withOrigin.

    Note that when the given lineNumber are equal to the lineNumber on this object, a new instance may not be created and this is returned directly.

    lineNumber

    the new line number

    returns

    the created ConfigOrigin

    Since

    1.3.0

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped