类 ClassLoaderFile
- java.lang.Object
- org.springframework.boot.devtools.restart.classloader.ClassLoaderFile
- 所有已实现的接口:
Serializable
public class ClassLoaderFile extends Object implements Serializable
A single file that may be served from aClassLoader
. Can be used to represent files that have been added, modified or deleted since the original JAR was created.- 从以下版本开始:
- 1.3.0
- 另请参阅:
ClassLoaderFileRepository
, 序列化表格
嵌套类概要
嵌套类 修饰符和类型 类 说明 static class
ClassLoaderFile.Kind
The kinds of class load files.
构造器概要
构造器 构造器 说明 ClassLoaderFile(ClassLoaderFile.Kind kind, byte[] contents)
Create a newClassLoaderFile
instance.ClassLoaderFile(ClassLoaderFile.Kind kind, long lastModified, byte[] contents)
Create a newClassLoaderFile
instance.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 byte[]
getContents()
Return the contents of the file as a byte array ornull
ifgetKind()
isClassLoaderFile.Kind.DELETED
.ClassLoaderFile.Kind
getKind()
Return the fileClassLoaderFile.Kind
(added, modified, deleted).long
getLastModified()
Return the time that the file was last modified.
构造器详细资料
ClassLoaderFile
public ClassLoaderFile(ClassLoaderFile.Kind kind, byte[] contents)
Create a newClassLoaderFile
instance.- 参数:
kind
- the kind of filecontents
- the file contents
ClassLoaderFile
public ClassLoaderFile(ClassLoaderFile.Kind kind, long lastModified, byte[] contents)
Create a newClassLoaderFile
instance.- 参数:
kind
- the kind of filelastModified
- the last modified timecontents
- the file contents
方法详细资料
getKind
public ClassLoaderFile.Kind getKind()
Return the fileClassLoaderFile.Kind
(added, modified, deleted).- 返回:
- the kind
getLastModified
public long getLastModified()
Return the time that the file was last modified.- 返回:
- the last modified time
getContents
public byte[] getContents()
Return the contents of the file as a byte array ornull
ifgetKind()
isClassLoaderFile.Kind.DELETED
.- 返回:
- the contents or
null