Class ReaderContext
java.lang.Object
org.springframework.beans.factory.parsing.ReaderContext
- Direct Known Subclasses:
- XmlReaderContext
Context that gets passed along a bean definition reading process,
 encapsulating all relevant configuration as well as state.
- Since:
- 2.0
- Author:
- Rob Harrop, Juergen Hoeller
- 
Constructor SummaryConstructorsConstructorDescriptionReaderContext(Resource resource, ProblemReporter problemReporter, ReaderEventListener eventListener, SourceExtractor sourceExtractor) Construct a newReaderContext.
- 
Method SummaryModifier and TypeMethodDescriptionvoidRaise a regular error.voidRaise a regular error.voiderror(String message, Object source, ParseState parseState) Raise a regular error.voiderror(String message, Object source, ParseState parseState, Throwable cause) Raise a regular error.extractSource(Object sourceCandidate) Call the source extractor for the given source object.voidRaise a fatal error.voidRaise a fatal error.voidfatal(String message, Object source, ParseState parseState) Raise a fatal error.voidfatal(String message, Object source, ParseState parseState, Throwable cause) Raise a fatal error.voidfireAliasRegistered(String beanName, String alias, Object source) Fire an alias-registered event.voidfireComponentRegistered(ComponentDefinition componentDefinition) Fire a component-registered event.voidfireDefaultsRegistered(DefaultsDefinition defaultsDefinition) Fire a defaults-registered event.voidfireImportProcessed(String importedResource, Object source) Fire an import-processed event.voidfireImportProcessed(String importedResource, Resource[] actualResources, Object source) Fire an import-processed event.final ResourceReturn the source extractor in use.voidRaise a non-critical warning.voidRaise a non-critical warning.voidwarning(String message, Object source, ParseState parseState) Raise a non-critical warning.voidwarning(String message, Object source, ParseState parseState, Throwable cause) Raise a non-critical warning.
- 
Constructor Details- 
ReaderContextpublic ReaderContext(Resource resource, ProblemReporter problemReporter, ReaderEventListener eventListener, SourceExtractor sourceExtractor) Construct a newReaderContext.- Parameters:
- resource- the XML bean definition resource
- problemReporter- the problem reporter in use
- eventListener- the event listener in use
- sourceExtractor- the source extractor in use
 
 
- 
- 
Method Details- 
getResource
- 
fatalRaise a fatal error.
- 
fatalRaise a fatal error.
- 
fatalRaise a fatal error.
- 
fatalpublic void fatal(String message, @Nullable Object source, @Nullable ParseState parseState, @Nullable Throwable cause) Raise a fatal error.
- 
errorRaise a regular error.
- 
errorRaise a regular error.
- 
errorRaise a regular error.
- 
errorpublic void error(String message, @Nullable Object source, @Nullable ParseState parseState, @Nullable Throwable cause) Raise a regular error.
- 
warningRaise a non-critical warning.
- 
warningRaise a non-critical warning.
- 
warningRaise a non-critical warning.
- 
warningpublic void warning(String message, @Nullable Object source, @Nullable ParseState parseState, @Nullable Throwable cause) Raise a non-critical warning.
- 
fireDefaultsRegisteredFire a defaults-registered event.
- 
fireComponentRegisteredFire a component-registered event.
- 
fireAliasRegisteredFire an alias-registered event.
- 
fireImportProcessedFire an import-processed event.
- 
fireImportProcessedpublic void fireImportProcessed(String importedResource, Resource[] actualResources, @Nullable Object source) Fire an import-processed event.
- 
getSourceExtractorReturn the source extractor in use.
- 
extractSourceCall the source extractor for the given source object.- Parameters:
- sourceCandidate- the original source object
- Returns:
- the source object to store, or nullfor none.
- See Also:
 
 
-