Class ClassLoaderFiles
- java.lang.Object
- org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles
 
- All Implemented Interfaces:
- Serializable,- ClassLoaderFileRepository
 - public class ClassLoaderFiles extends Object implements ClassLoaderFileRepository, Serializable - ClassLoaderFileRepositorythat maintains a collection of- ClassLoaderFileitems grouped by source folders.- Since:
- 1.3.0
- See Also:
- ClassLoaderFile,- ClassLoaderRepository, Serialized Form
 
- Nested Class Summary- Nested Classes - Modifier and Type - Class - Description - static class- ClassLoaderFiles.SourceFolderAn individual source folder that is being managed by the collection.
 - Field Summary- Fields inherited from interface org.springframework.boot.devtools.restart.classloader.ClassLoaderFileRepository- NONE
 
 - Constructor Summary- Constructors - Constructor - Description - ClassLoaderFiles()Create a new- ClassLoaderFilesinstance.- ClassLoaderFiles(ClassLoaderFiles classLoaderFiles)Create a new- ClassLoaderFilesinstance.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - void- addAll(ClassLoaderFiles files)Add all elements items from the specified- ClassLoaderFilesto this instance.- void- addFile(String sourceFolder, String name, ClassLoaderFile file)Add a single- ClassLoaderFileto the collection.- void- addFile(String name, ClassLoaderFile file)Add a single- ClassLoaderFileto the collection.- ClassLoaderFile- getFile(String name)Return a- ClassLoaderFilefor the given name or- nullif no file is contained in this collection.- protected ClassLoaderFiles.SourceFolder- getOrCreateSourceFolder(String name)Get or create a- ClassLoaderFiles.SourceFolderwith the given name.- Collection<ClassLoaderFiles.SourceFolder>- getSourceFolders()Return all- SourceFoldersthat have been added to the collection.- int- size()Return the size of the collection.
 
- Constructor Detail- ClassLoaderFiles- public ClassLoaderFiles() Create a new- ClassLoaderFilesinstance.
 - ClassLoaderFiles- public ClassLoaderFiles(ClassLoaderFiles classLoaderFiles) Create a new- ClassLoaderFilesinstance.- Parameters:
- classLoaderFiles- the source classloader files.
 
 
 - Method Detail- addAll- public void addAll(ClassLoaderFiles files) Add all elements items from the specified- ClassLoaderFilesto this instance.- Parameters:
- files- the files to add
 
 - addFile- public void addFile(String name, ClassLoaderFile file) Add a single- ClassLoaderFileto the collection.- Parameters:
- name- the name of the file
- file- the file to add
 
 - addFile- public void addFile(String sourceFolder, String name, ClassLoaderFile file) Add a single- ClassLoaderFileto the collection.- Parameters:
- sourceFolder- the source folder of the file
- name- the name of the file
- file- the file to add
 
 - getOrCreateSourceFolder- protected final ClassLoaderFiles.SourceFolder getOrCreateSourceFolder(String name) Get or create a- ClassLoaderFiles.SourceFolderwith the given name.- Parameters:
- name- the name of the folder
- Returns:
- an existing or newly added ClassLoaderFiles.SourceFolder
 
 - getSourceFolders- public Collection<ClassLoaderFiles.SourceFolder> getSourceFolders() Return all- SourceFoldersthat have been added to the collection.- Returns:
- a collection of ClassLoaderFiles.SourceFolderitems
 
 - size- public int size() Return the size of the collection.- Returns:
- the size of the collection
 
 - getFile- public ClassLoaderFile getFile(String name) Description copied from interface:- ClassLoaderFileRepositoryReturn a- ClassLoaderFilefor the given name or- nullif no file is contained in this collection.- Specified by:
- getFilein interface- ClassLoaderFileRepository
- Parameters:
- name- the name of the file
- Returns:
- a ClassLoaderFileornull