|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConfigOrigin
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.
Method Summary | |
---|---|
List<String> |
comments()
Returns any comments that appeared to "go with" this place in the file. |
String |
description()
Returns a string describing the origin of a value or exception. |
String |
filename()
Returns a filename describing the origin. |
int |
lineNumber()
Returns a line number where the value or exception originated. |
String |
resource()
Returns a classpath resource name describing the origin. |
URL |
url()
Returns a URL describing the origin. |
Method Detail |
---|
String description()
String filename()
URL url()
String resource()
int lineNumber()
List<String> comments()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |