spring-framework / org.springframework.beans.factory.parsing / ReaderContext

ReaderContext

open class ReaderContext

Context that gets passed along a bean definition reading process, encapsulating all relevant configuration as well as state.

Author
Rob Harrop

Author
Juergen Hoeller

Since
2.0

Constructors

<init>

ReaderContext(resource: Resource, problemReporter: ProblemReporter, eventListener: ReaderEventListener, sourceExtractor: SourceExtractor)

Construct a new ReaderContext.

Functions

error

open fun error(message: String, source: Any): Unit
open fun error(message: String, source: Any, cause: Throwable): Unit
open fun error(message: String, source: Any, parseState: ParseState): Unit
open fun error(message: String, source: Any, parseState: ParseState, cause: Throwable): Unit

Raise a regular error.

extractSource

open fun extractSource(sourceCandidate: Any): Any

Call the source extractor for the given source object.

fatal

open fun fatal(message: String, source: Any): Unit
open fun fatal(message: String, source: Any, cause: Throwable): Unit
open fun fatal(message: String, source: Any, parseState: ParseState): Unit
open fun fatal(message: String, source: Any, parseState: ParseState, cause: Throwable): Unit

Raise a fatal error.

fireAliasRegistered

open fun fireAliasRegistered(beanName: String, alias: String, source: Any): Unit

Fire an alias-registered event.

fireComponentRegistered

open fun fireComponentRegistered(componentDefinition: ComponentDefinition): Unit

Fire an component-registered event.

fireDefaultsRegistered

open fun fireDefaultsRegistered(defaultsDefinition: DefaultsDefinition): Unit

Fire an defaults-registered event.

fireImportProcessed

open fun fireImportProcessed(importedResource: String, source: Any): Unit
open fun fireImportProcessed(importedResource: String, actualResources: Array<Resource>, source: Any): Unit

Fire an import-processed event.

getResource

fun getResource(): Resource

getSourceExtractor

open fun getSourceExtractor(): SourceExtractor

Return the source extractor in use.

warning

open fun warning(message: String, source: Any): Unit
open fun warning(message: String, source: Any, cause: Throwable): Unit
open fun warning(message: String, source: Any, parseState: ParseState): Unit
open fun warning(message: String, source: Any, parseState: ParseState, cause: Throwable): Unit

Raise a non-critical warning.

Inheritors

XmlReaderContext

open class XmlReaderContext : ReaderContext

Extension of org.springframework.beans.factory.parsing.ReaderContext, specific to use with an XmlBeanDefinitionReader. Provides access to the NamespaceHandlerResolver configured in the XmlBeanDefinitionReader.