public class ClassLoaderFiles extends Object implements ClassLoaderFileRepository, Serializable
ClassLoaderFileRepository
that maintains a collection of
ClassLoaderFile
items grouped by source folders.ClassLoaderFile
,
ClassLoaderRepository
,
Serialized FormModifier and Type | Class and Description |
---|---|
static class |
ClassLoaderFiles.SourceFolder
An individual source folder that is being managed by the collection.
|
NONE
Constructor and Description |
---|
ClassLoaderFiles()
Create a new
ClassLoaderFiles instance. |
ClassLoaderFiles(ClassLoaderFiles classLoaderFiles)
Create a new
ClassLoaderFiles instance. |
Modifier and Type | Method and Description |
---|---|
void |
addAll(ClassLoaderFiles files)
Add all elements items from the specified
ClassLoaderFiles to this
instance. |
void |
addFile(String name,
ClassLoaderFile file)
Add a single
ClassLoaderFile to the collection. |
void |
addFile(String sourceFolder,
String name,
ClassLoaderFile file)
Add a single
ClassLoaderFile to the collection. |
ClassLoaderFile |
getFile(String name)
Return a
ClassLoaderFile for the given name or null if no file is
contained in this collection. |
protected ClassLoaderFiles.SourceFolder |
getOrCreateSourceFolder(String name)
Get or create a
ClassLoaderFiles.SourceFolder with the given name. |
Collection<ClassLoaderFiles.SourceFolder> |
getSourceFolders()
Return all
SourceFolders that have been added to the
collection. |
int |
size()
Return the size of the collection.
|
public ClassLoaderFiles()
ClassLoaderFiles
instance.public ClassLoaderFiles(ClassLoaderFiles classLoaderFiles)
ClassLoaderFiles
instance.classLoaderFiles
- the source classloader files.public void addAll(ClassLoaderFiles files)
ClassLoaderFiles
to this
instance.files
- the files to addpublic void addFile(String name, ClassLoaderFile file)
ClassLoaderFile
to the collection.name
- the name of the filefile
- the file to addpublic void addFile(String sourceFolder, String name, ClassLoaderFile file)
ClassLoaderFile
to the collection.sourceFolder
- the source folder of the filename
- the name of the filefile
- the file to addprotected final ClassLoaderFiles.SourceFolder getOrCreateSourceFolder(String name)
ClassLoaderFiles.SourceFolder
with the given name.name
- the name of the folderClassLoaderFiles.SourceFolder
public Collection<ClassLoaderFiles.SourceFolder> getSourceFolders()
SourceFolders
that have been added to the
collection.ClassLoaderFiles.SourceFolder
itemspublic int size()
public ClassLoaderFile getFile(String name)
ClassLoaderFileRepository
ClassLoaderFile
for the given name or null
if no file is
contained in this collection.getFile
in interface ClassLoaderFileRepository
name
- the name of the fileClassLoaderFile
or null
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.