com.crashnote.core.config.helper.ConfigValue Maven / Gradle / Ivy
Show all versions of crashnote-servlet Show documentation
/**
* Copyright (C) 2011-2012 Typesafe Inc.
*/
package com.crashnote.core.config.helper;
/**
* An immutable value, following the JSON type
* schema.
*
*
* Because this object is immutable, it is safe to use from multiple threads and
* there's no need for "defensive copies."
*
*
* Do not implement {@code ConfigValue}; 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.
*/
public interface ConfigValue extends ConfigMergeable {
/**
* The origin of the value (file, line number, etc.), for debugging and
* error messages.
*
* @return where the value came from
*/
ConfigOrigin origin();
/**
* The {@link ConfigValueType} of the value; matches the JSON type schema.
*
* @return value's type
*/
ConfigValueType valueType();
/**
* Returns the value as a plain Java boxed value, that is, a {@code String},
* {@code Number}, {@code Boolean}, {@code Map},
* {@code List