public class ReaderContext extends Object
Constructor and Description |
---|
ReaderContext(Resource resource,
ProblemReporter problemReporter,
ReaderEventListener eventListener,
SourceExtractor sourceExtractor)
Construct a new
ReaderContext . |
Modifier and Type | Method and Description |
---|---|
void |
error(String message,
Object source)
Raise a regular error.
|
void |
error(String message,
Object source,
ParseState parseState)
Raise a regular error.
|
void |
error(String message,
Object source,
ParseState parseState,
Throwable cause)
Raise a regular error.
|
void |
error(String message,
Object source,
Throwable ex)
Raise a regular error.
|
Object |
extractSource(Object sourceCandidate)
Call the source extractor for the given source object.
|
void |
fatal(String message,
Object source)
Raise a fatal error.
|
void |
fatal(String message,
Object source,
ParseState parseState)
Raise a fatal error.
|
void |
fatal(String message,
Object source,
ParseState parseState,
Throwable cause)
Raise a fatal error.
|
void |
fatal(String message,
Object source,
Throwable ex)
Raise a fatal error.
|
void |
fireAliasRegistered(String beanName,
String alias,
Object source)
Fire an alias-registered event.
|
void |
fireComponentRegistered(ComponentDefinition componentDefinition)
Fire an component-registered event.
|
void |
fireDefaultsRegistered(DefaultsDefinition defaultsDefinition)
Fire an defaults-registered event.
|
void |
fireImportProcessed(String importedResource,
Object source)
Fire an import-processed event.
|
void |
fireImportProcessed(String importedResource,
Resource[] actualResources,
Object source)
Fire an import-processed event.
|
Resource |
getResource() |
SourceExtractor |
getSourceExtractor()
Return the source extractor in use.
|
void |
warning(String message,
Object source)
Raise a non-critical warning.
|
void |
warning(String message,
Object source,
ParseState parseState)
Raise a non-critical warning.
|
void |
warning(String message,
Object source,
ParseState parseState,
Throwable cause)
Raise a non-critical warning.
|
void |
warning(String message,
Object source,
Throwable ex)
Raise a non-critical warning.
|
public ReaderContext(Resource resource, ProblemReporter problemReporter, ReaderEventListener eventListener, SourceExtractor sourceExtractor)
ReaderContext
.resource
- the XML bean definition resourceproblemReporter
- the problem reporter in useeventListener
- the event listener in usesourceExtractor
- the source extractor in usepublic final Resource getResource()
public void fatal(String message, Object source, ParseState parseState)
public void fatal(String message, Object source, ParseState parseState, Throwable cause)
public void error(String message, Object source, ParseState parseState)
public void error(String message, Object source, ParseState parseState, Throwable cause)
public void warning(String message, Object source, Throwable ex)
public void warning(String message, Object source, ParseState parseState)
public void warning(String message, Object source, ParseState parseState, Throwable cause)
public void fireDefaultsRegistered(DefaultsDefinition defaultsDefinition)
public void fireComponentRegistered(ComponentDefinition componentDefinition)
public void fireAliasRegistered(String beanName, String alias, Object source)
public void fireImportProcessed(String importedResource, Object source)
public void fireImportProcessed(String importedResource, Resource[] actualResources, Object source)
public SourceExtractor getSourceExtractor()
public Object extractSource(Object sourceCandidate)
sourceCandidate
- the original source objectnull
for none.getSourceExtractor()
,
SourceExtractor.extractSource(java.lang.Object, org.springframework.core.io.Resource)