public class ClassLoaderFile extends Object implements Serializable
ClassLoader
. Can be used to represent
files that have been added, modified or deleted since the original JAR was created.ClassLoaderFileRepository
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
ClassLoaderFile.Kind
The kinds of class load files.
|
Constructor and Description |
---|
ClassLoaderFile(ClassLoaderFile.Kind kind,
byte[] contents)
Create a new
ClassLoaderFile instance. |
ClassLoaderFile(ClassLoaderFile.Kind kind,
long lastModified,
byte[] contents)
Create a new
ClassLoaderFile instance. |
Modifier and Type | Method and Description |
---|---|
byte[] |
getContents()
Return the contents of the file as a byte array or
null if
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.
|
public ClassLoaderFile(ClassLoaderFile.Kind kind, byte[] contents)
ClassLoaderFile
instance.kind
- the kind of filecontents
- the file contentspublic ClassLoaderFile(ClassLoaderFile.Kind kind, long lastModified, byte[] contents)
ClassLoaderFile
instance.kind
- the kind of filelastModified
- the last modified timecontents
- the file contentspublic ClassLoaderFile.Kind getKind()
ClassLoaderFile.Kind
(added, modified, deleted).public long getLastModified()
public byte[] getContents()
null
if
getKind()
is ClassLoaderFile.Kind.DELETED
.null
Copyright © 2020 Pivotal Software, Inc.. All rights reserved.