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.
Author
Rob Harrop
Author
Juergen Hoeller
Since
2.0
XmlReaderContext(resource: Resource, problemReporter: ProblemReporter, eventListener: ReaderEventListener, sourceExtractor: SourceExtractor, reader: XmlBeanDefinitionReader, namespaceHandlerResolver: NamespaceHandlerResolver)
Construct a new |
open fun generateBeanName(beanDefinition: BeanDefinition): String
Call the bean name generator for the given bean definition. |
|
fun getBeanClassLoader(): ClassLoader
Return the bean class loader to use, if any. Note that this will be null in regular scenarios, as an indication to lazily resolve bean classes. |
|
fun getEnvironment(): Environment
Return the environment to use. |
|
fun getNamespaceHandlerResolver(): NamespaceHandlerResolver
Return the namespace resolver. |
|
fun getReader(): XmlBeanDefinitionReader
Return the XML bean definition reader in use. |
|
fun getRegistry(): BeanDefinitionRegistry
Return the bean definition registry to use. |
|
fun getResourceLoader(): ResourceLoader
Return the resource loader to use, if any. This will be non-null in regular scenarios, also allowing access to the resource class loader. |
|
open fun readDocumentFromString(documentContent: String): Document
Read an XML document from the given String. |
|
open fun registerWithGeneratedName(beanDefinition: BeanDefinition): String
Call the bean name generator for the given bean definition and register the bean definition under the generated name. |
open fun error(message: String, source: Any): Unitopen fun error(message: String, source: Any, cause: Throwable): Unitopen fun error(message: String, source: Any, parseState: ParseState): Unitopen fun error(message: String, source: Any, parseState: ParseState, cause: Throwable): Unit
Raise a regular error. |
|
open fun extractSource(sourceCandidate: Any): Any
Call the source extractor for the given source object. |
|
open fun fatal(message: String, source: Any): Unitopen fun fatal(message: String, source: Any, cause: Throwable): Unitopen fun fatal(message: String, source: Any, parseState: ParseState): Unitopen fun fatal(message: String, source: Any, parseState: ParseState, cause: Throwable): Unit
Raise a fatal error. |
|
open fun fireAliasRegistered(beanName: String, alias: String, source: Any): Unit
Fire an alias-registered event. |
|
open fun fireComponentRegistered(componentDefinition: ComponentDefinition): Unit
Fire an component-registered event. |
|
open fun fireDefaultsRegistered(defaultsDefinition: DefaultsDefinition): Unit
Fire an defaults-registered event. |
|
open fun fireImportProcessed(importedResource: String, source: Any): Unitopen fun fireImportProcessed(importedResource: String, actualResources: Array<Resource>, source: Any): Unit
Fire an import-processed event. |
|
fun getResource(): Resource |
|
open fun getSourceExtractor(): SourceExtractor
Return the source extractor in use. |
|
open fun warning(message: String, source: Any): Unitopen fun warning(message: String, source: Any, cause: Throwable): Unitopen fun warning(message: String, source: Any, parseState: ParseState): Unitopen fun warning(message: String, source: Any, parseState: ParseState, cause: Throwable): Unit
Raise a non-critical warning. |