Interface ConfigurationReader
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
AbstractConfigurationReader
,JsonConfigurationReader
,XmlConfigurationReader
,YamlConfigurationReader
public interface ConfigurationReader extends AutoCloseable
- Since:
- 12.1
- Author:
- Tristan Tarrant <[email protected]>
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ConfigurationReader.Builder
static class
ConfigurationReader.ElementType
-
Method Summary
-
-
-
Method Detail
-
from
static ConfigurationReader.Builder from(InputStream is)
-
from
static ConfigurationReader.Builder from(Reader reader)
-
from
static ConfigurationReader.Builder from(String s)
-
getResourceResolver
ConfigurationResourceResolver getResourceResolver()
- Returns:
- the resource resolver used by this ConfigurationReader to find external references (e.g. includes)
-
getNamingStrategy
NamingStrategy getNamingStrategy()
- Returns:
- the naming strategy used by this ConfigurationReader
-
setSchema
void setSchema(ConfigurationSchemaVersion schema)
- Parameters:
schema
- the ConfigurationSchema in use
-
getSchema
ConfigurationSchemaVersion getSchema()
- Returns:
- the schema
-
nextElement
ConfigurationReader.ElementType nextElement()
- Returns:
- the next element
-
inTag
default boolean inTag()
-
inTag
default boolean inTag(String name)
-
inTag
default boolean inTag(Enum<?> name)
-
getLocation
Location getLocation()
-
getProperties
Properties getProperties()
-
getAttributeName
String getAttributeName(int index)
-
getAttributeName
String getAttributeName(int index, NamingStrategy strategy)
-
getAttributeNamespace
String getAttributeNamespace(int index)
-
getAttributeValue
String getAttributeValue(String localName, NamingStrategy strategy)
-
getAttributeValue
default String getAttributeValue(Enum<?> localName, NamingStrategy strategy)
-
getAttributeValue
String getAttributeValue(int index)
-
getListAttributeValue
default String[] getListAttributeValue(int index)
Get the value of an attribute as a space-delimited string list.- Parameters:
index
- the index of the attribute
-
getElementText
String getElementText()
-
getLocalName
String getLocalName()
-
getLocalName
String getLocalName(NamingStrategy strategy)
-
getNamespace
String getNamespace()
-
hasNext
boolean hasNext()
-
getAttributeCount
int getAttributeCount()
-
handleAny
void handleAny(ConfigurationReaderContext context)
-
handleAttribute
void handleAttribute(ConfigurationReaderContext context, int i)
-
require
default void require(ConfigurationReader.ElementType type)
-
require
void require(ConfigurationReader.ElementType type, String namespace, String name)
-
require
default void require(ConfigurationReader.ElementType type, String namespace, Enum<?> name)
-
endMapItem
void endMapItem()
-
hasFeature
boolean hasFeature(ConfigurationFormatFeature feature)
-
close
void close()
- Specified by:
close
in interfaceAutoCloseable
-
-