org.springframework.beans.factory.parsing

Class ReaderContext

  • java.lang.Object
    • org.springframework.beans.factory.parsing.ReaderContext
  • Direct Known Subclasses:
    XmlReaderContext


    public class ReaderContext
    extends java.lang.Object
    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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void error(java.lang.String message, java.lang.Object source)
      Raise a regular error.
      void error(java.lang.String message, java.lang.Object source, ParseState parseState)
      Raise a regular error.
      void error(java.lang.String message, java.lang.Object source, ParseState parseState, java.lang.Throwable cause)
      Raise a regular error.
      void error(java.lang.String message, java.lang.Object source, java.lang.Throwable cause)
      Raise a regular error.
      java.lang.Object extractSource(java.lang.Object sourceCandidate)
      Call the source extractor for the given source object.
      void fatal(java.lang.String message, java.lang.Object source)
      Raise a fatal error.
      void fatal(java.lang.String message, java.lang.Object source, ParseState parseState)
      Raise a fatal error.
      void fatal(java.lang.String message, java.lang.Object source, ParseState parseState, java.lang.Throwable cause)
      Raise a fatal error.
      void fatal(java.lang.String message, java.lang.Object source, java.lang.Throwable cause)
      Raise a fatal error.
      void fireAliasRegistered(java.lang.String beanName, java.lang.String alias, java.lang.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(java.lang.String importedResource, java.lang.Object source)
      Fire an import-processed event.
      void fireImportProcessed(java.lang.String importedResource, Resource[] actualResources, java.lang.Object source)
      Fire an import-processed event.
      Resource getResource() 
      SourceExtractor getSourceExtractor()
      Return the source extractor in use.
      void warning(java.lang.String message, java.lang.Object source)
      Raise a non-critical warning.
      void warning(java.lang.String message, java.lang.Object source, ParseState parseState)
      Raise a non-critical warning.
      void warning(java.lang.String message, java.lang.Object source, ParseState parseState, java.lang.Throwable cause)
      Raise a non-critical warning.
      void warning(java.lang.String message, java.lang.Object source, java.lang.Throwable cause)
      Raise a non-critical warning.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReaderContext

        public ReaderContext(Resource resource,
                             ProblemReporter problemReporter,
                             ReaderEventListener eventListener,
                             SourceExtractor sourceExtractor)
        Construct a new ReaderContext.
        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 Detail

      • getResource

        public final Resource getResource()
      • fatal

        public void fatal(java.lang.String message,
                          @Nullable
                          java.lang.Object source)
        Raise a fatal error.
      • fatal

        public void fatal(java.lang.String message,
                          @Nullable
                          java.lang.Object source,
                          @Nullable
                          java.lang.Throwable cause)
        Raise a fatal error.
      • fatal

        public void fatal(java.lang.String message,
                          @Nullable
                          java.lang.Object source,
                          @Nullable
                          ParseState parseState)
        Raise a fatal error.
      • error

        public void error(java.lang.String message,
                          @Nullable
                          java.lang.Object source)
        Raise a regular error.
      • error

        public void error(java.lang.String message,
                          @Nullable
                          java.lang.Object source,
                          @Nullable
                          java.lang.Throwable cause)
        Raise a regular error.
      • error

        public void error(java.lang.String message,
                          @Nullable
                          java.lang.Object source,
                          @Nullable
                          ParseState parseState)
        Raise a regular error.
      • error

        public void error(java.lang.String message,
                          @Nullable
                          java.lang.Object source,
                          @Nullable
                          ParseState parseState,
                          @Nullable
                          java.lang.Throwable cause)
        Raise a regular error.
      • warning

        public void warning(java.lang.String message,
                            @Nullable
                            java.lang.Object source)
        Raise a non-critical warning.
      • warning

        public void warning(java.lang.String message,
                            @Nullable
                            java.lang.Object source,
                            @Nullable
                            java.lang.Throwable cause)
        Raise a non-critical warning.
      • warning

        public void warning(java.lang.String message,
                            @Nullable
                            java.lang.Object source,
                            @Nullable
                            ParseState parseState)
        Raise a non-critical warning.
      • warning

        public void warning(java.lang.String message,
                            @Nullable
                            java.lang.Object source,
                            @Nullable
                            ParseState parseState,
                            @Nullable
                            java.lang.Throwable cause)
        Raise a non-critical warning.
      • fireDefaultsRegistered

        public void fireDefaultsRegistered(DefaultsDefinition defaultsDefinition)
        Fire an defaults-registered event.
      • fireComponentRegistered

        public void fireComponentRegistered(ComponentDefinition componentDefinition)
        Fire an component-registered event.
      • fireAliasRegistered

        public void fireAliasRegistered(java.lang.String beanName,
                                        java.lang.String alias,
                                        @Nullable
                                        java.lang.Object source)
        Fire an alias-registered event.
      • fireImportProcessed

        public void fireImportProcessed(java.lang.String importedResource,
                                        @Nullable
                                        java.lang.Object source)
        Fire an import-processed event.
      • fireImportProcessed

        public void fireImportProcessed(java.lang.String importedResource,
                                        Resource[] actualResources,
                                        @Nullable
                                        java.lang.Object source)
        Fire an import-processed event.
      • getSourceExtractor

        public SourceExtractor getSourceExtractor()
        Return the source extractor in use.