Top Description Methods
org.springframework.beans.factory.parsing

public Interface SourceExtractor

Known Direct Implementers
org.springframework.beans.factory.parsing.NullSourceExtractor, org.springframework.beans.factory.parsing.PassThroughSourceExtractor
Annotations
@FunctionalInterface
Imports
org.springframework.core.io.Resource, org.springframework.lang.Nullable

Simple strategy allowing tools to control how source metadata is attached to the bean definition metadata.

Configuration parsers may provide the ability to attach source metadata during the parse phase. They will offer this metadata in a generic format which can be further modified by a SourceExtractor before being attached to the bean definition metadata.

Authors
Rob Harrop, Juergen Hoeller
Since
2.0
See Also
org.springframework.beans.BeanMetadataElement#getSource(), org.springframework.beans.factory.config.BeanDefinition

Method Summary

Modifier and TypeMethod and Description
public Object

Returns:

the source metadata object to store (may be null)
extractSource
(Object
the original source metadata (never null)
sourceCandidate
,
Resource
the resource that defines the given source object (may be null)
definingResource
)

Extract the source metadata from the candidate object supplied by the configuration parser.

Method Detail

extractSourceback to summary
public Object extractSource(Object sourceCandidate, Resource definingResource)

Extract the source metadata from the candidate object supplied by the configuration parser.

Parameters
sourceCandidate:Object

the original source metadata (never null)

definingResource:Resource

the resource that defines the given source object (may be null)

Returns:Object

the source metadata object to store (may be null)

Annotations
@Nullable