Class ClassLoaderFile
- java.lang.Object
- org.springframework.boot.devtools.restart.classloader.ClassLoaderFile
 
- All Implemented Interfaces:
- Serializable
 - public class ClassLoaderFile extends Object implements Serializable A single file that may be served from a- ClassLoader. Can be used to represent files that have been added, modified or deleted since the original JAR was created.- Since:
- 1.3.0
- See Also:
- ClassLoaderFileRepository, Serialized Form
 
- Nested Class Summary- Nested Classes - Modifier and Type - Class - Description - static class- ClassLoaderFile.KindThe kinds of class load files.
 - Constructor Summary- Constructors - Constructor - Description - ClassLoaderFile(ClassLoaderFile.Kind kind, byte[] contents)Create a new- ClassLoaderFileinstance.- ClassLoaderFile(ClassLoaderFile.Kind kind, long lastModified, byte[] contents)Create a new- ClassLoaderFileinstance.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - byte[]- getContents()Return the contents of the file as a byte array or- nullif- getKind()is- ClassLoaderFile.Kind.DELETED.- ClassLoaderFile.Kind- getKind()Return the file- ClassLoaderFile.Kind(added, modified, deleted).- long- getLastModified()Return the time that the file was last modified.
 
- Constructor Detail- ClassLoaderFile- public ClassLoaderFile(ClassLoaderFile.Kind kind, byte[] contents) Create a new- ClassLoaderFileinstance.- Parameters:
- kind- the kind of file
- contents- the file contents
 
 - ClassLoaderFile- public ClassLoaderFile(ClassLoaderFile.Kind kind, long lastModified, byte[] contents) Create a new- ClassLoaderFileinstance.- Parameters:
- kind- the kind of file
- lastModified- the last modified time
- contents- the file contents
 
 
 - Method Detail- getKind- public ClassLoaderFile.Kind getKind() Return the file- ClassLoaderFile.Kind(added, modified, deleted).- Returns:
- the kind
 
 - getLastModified- public long getLastModified() Return the time that the file was last modified.- Returns:
- the last modified time
 
 - getContents- public byte[] getContents() Return the contents of the file as a byte array or- nullif- getKind()is- ClassLoaderFile.Kind.DELETED.- Returns:
- the contents or null