Class ModifyableSourceLibrary

  • All Implemented Interfaces:
    com.thoughtworks.qdox.library.ClassLibrary, java.io.Serializable

    public class ModifyableSourceLibrary
    extends com.thoughtworks.qdox.library.SourceLibrary
    SourceLibrary parsing inputs into the JavaSource representation by using a ModifyableModelBuilder in order to get the internal representation of JavaClasses as ModifyableJavaClasses
    See Also:
    Serialized Form
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.thoughtworks.qdox.model.JavaSource addSource​(java.lang.Object source)
      Adds a source to the source repository and returns it representative JavaSource
      protected com.thoughtworks.qdox.builder.Builder getModelBuilder()  
      protected com.thoughtworks.qdox.model.JavaSource parse​(java.io.InputStream stream, java.net.URL url, com.thoughtworks.qdox.builder.Builder modelBuilder)
      Parses the given stream contents and closes the stream if any exception occurs
      protected com.thoughtworks.qdox.model.JavaSource parse​(java.io.Reader reader, java.net.URL url, com.thoughtworks.qdox.builder.Builder modelBuilder)
      Parses the given reader contents and closes the reader if any exception occurs
      • Methods inherited from class com.thoughtworks.qdox.library.SourceLibrary

        addSource, addSource, addSource, addSource, containsClassReference, getEncoding, getErrorHandler, getJavaClasses, getJavaPackages, getJavaSources, isDebugLexer, isDebugParser, registerJavaSource, resolveJavaClass, resolveJavaPackage, setDebugLexer, setDebugParser, setEncoding, setErrorHandler
      • Methods inherited from class com.thoughtworks.qdox.library.AbstractClassLibrary

        getJavaClass, getJavaClass, getJavaClasses, getJavaModules, getJavaPackage, getJavaPackages, getJavaSources, getModelBuilder, getModelBuilderFactory, getModelWriterFactory, hasClassReference, setModelBuilderFactory, setModelWriterFactory
      • Methods inherited from class java.lang.Object

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

      • ModifyableSourceLibrary

        public ModifyableSourceLibrary​(com.thoughtworks.qdox.library.AbstractClassLibrary parent)
        Creates a new ModifyableJavaClass
        Parameters:
        parent - ClassLibrary
    • Method Detail

      • addSource

        public com.thoughtworks.qdox.model.JavaSource addSource​(java.lang.Object source)
                                                         throws com.thoughtworks.qdox.parser.ParseException,
                                                                java.io.IOException
        Adds a source to the source repository and returns it representative JavaSource
        Parameters:
        source - to be parsed
        Returns:
        the created JavaSource
        Throws:
        com.thoughtworks.qdox.parser.ParseException - if the given source could not be parsed
        java.io.IOException - if the given source was a file which could not be accessed
      • parse

        protected com.thoughtworks.qdox.model.JavaSource parse​(java.io.InputStream stream,
                                                               java.net.URL url,
                                                               com.thoughtworks.qdox.builder.Builder modelBuilder)
                                                        throws com.thoughtworks.qdox.parser.ParseException
        Parses the given stream contents and closes the stream if any exception occurs
        Parameters:
        stream - to be parsed
        url - of the source
        modelBuilder - used to construct the model
        Returns:
        the created JavaSource
        Throws:
        com.thoughtworks.qdox.parser.ParseException - if any exception occurs while parsing
      • parse

        protected com.thoughtworks.qdox.model.JavaSource parse​(java.io.Reader reader,
                                                               java.net.URL url,
                                                               com.thoughtworks.qdox.builder.Builder modelBuilder)
                                                        throws com.thoughtworks.qdox.parser.ParseException
        Parses the given reader contents and closes the reader if any exception occurs
        Parameters:
        reader - to be parsed
        url - of the source
        modelBuilder - used to construct the model
        Returns:
        the created JavaSource
        Throws:
        com.thoughtworks.qdox.parser.ParseException - if any exception occurs while parsing
      • getModelBuilder

        protected com.thoughtworks.qdox.builder.Builder getModelBuilder()
        Overrides:
        getModelBuilder in class com.thoughtworks.qdox.library.AbstractClassLibrary