类 ClassLoaderFiles
- java.lang.Object
- org.springframework.boot.devtools.restart.classloader.ClassLoaderFiles
- 所有已实现的接口:
Serializable
,ClassLoaderFileRepository
public class ClassLoaderFiles extends Object implements ClassLoaderFileRepository, Serializable
ClassLoaderFileRepository
that maintains a collection ofClassLoaderFile
items grouped by source folders.- 从以下版本开始:
- 1.3.0
- 另请参阅:
ClassLoaderFile
,ClassLoaderRepository
, 序列化表格
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
ClassLoaderFiles.SourceFolder
An individual source folder that is being managed by the collection.
字段概要
从接口继承的字段 org.springframework.boot.devtools.restart.classloader.ClassLoaderFileRepository
NONE
构造器概要
构造器 构造器 说明 ClassLoaderFiles()
Create a newClassLoaderFiles
instance.ClassLoaderFiles(ClassLoaderFiles classLoaderFiles)
Create a newClassLoaderFiles
instance.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
addAll(ClassLoaderFiles files)
Add all elements items from the specifiedClassLoaderFiles
to this instance.void
addFile(String sourceFolder, String name, ClassLoaderFile file)
Add a singleClassLoaderFile
to the collection.void
addFile(String name, ClassLoaderFile file)
Add a singleClassLoaderFile
to the collection.ClassLoaderFile
getFile(String name)
Return aClassLoaderFile
for the given name ornull
if no file is contained in this collection.protected ClassLoaderFiles.SourceFolder
getOrCreateSourceFolder(String name)
Get or create aClassLoaderFiles.SourceFolder
with the given name.Collection<ClassLoaderFiles.SourceFolder>
getSourceFolders()
Return allSourceFolders
that have been added to the collection.int
size()
Return the size of the collection.
构造器详细资料
ClassLoaderFiles
public ClassLoaderFiles()
Create a newClassLoaderFiles
instance.
ClassLoaderFiles
public ClassLoaderFiles(ClassLoaderFiles classLoaderFiles)
Create a newClassLoaderFiles
instance.- 参数:
classLoaderFiles
- the source classloader files.
方法详细资料
addAll
public void addAll(ClassLoaderFiles files)
Add all elements items from the specifiedClassLoaderFiles
to this instance.- 参数:
files
- the files to add
addFile
public void addFile(String name, ClassLoaderFile file)
Add a singleClassLoaderFile
to the collection.- 参数:
name
- the name of the filefile
- the file to add
addFile
public void addFile(String sourceFolder, String name, ClassLoaderFile file)
Add a singleClassLoaderFile
to the collection.- 参数:
sourceFolder
- the source folder of the filename
- the name of the filefile
- the file to add
getOrCreateSourceFolder
protected final ClassLoaderFiles.SourceFolder getOrCreateSourceFolder(String name)
Get or create aClassLoaderFiles.SourceFolder
with the given name.- 参数:
name
- the name of the folder- 返回:
- an existing or newly added
ClassLoaderFiles.SourceFolder
getSourceFolders
public Collection<ClassLoaderFiles.SourceFolder> getSourceFolders()
Return allSourceFolders
that have been added to the collection.- 返回:
- a collection of
ClassLoaderFiles.SourceFolder
items
size
public int size()
Return the size of the collection.- 返回:
- the size of the collection
getFile
public ClassLoaderFile getFile(String name)
从接口复制的说明:ClassLoaderFileRepository
Return aClassLoaderFile
for the given name ornull
if no file is contained in this collection.- 指定者:
getFile
在接口中ClassLoaderFileRepository
- 参数:
name
- the name of the file- 返回:
- a
ClassLoaderFile
ornull