public class VirtualFilePointerContainerImpl extends TraceableDisposable implements VirtualFilePointerContainer, Disposable
Disposable.Parent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
JAR_DIRECTORY_ELEMENT |
static java.lang.String |
RECURSIVE_ATTR |
static java.lang.String |
URL_ATTR |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String url) |
void |
add(VirtualFile file) |
void |
addAll(java.util.Collection<java.lang.String> urls) |
void |
addAll(VirtualFilePointerContainer that) |
void |
addAllJarDirectories(java.util.Collection<java.lang.String> directoryUrls,
boolean recursively)
optimization: faster than calling
addJarDirectory(String, boolean) one by one |
void |
addJarDirectory(java.lang.String directoryUrl,
boolean recursively)
Adds
directory as a root of jar files. |
void |
clear() |
VirtualFilePointerContainer |
clone(Disposable parent) |
VirtualFilePointerContainer |
clone(Disposable parent,
VirtualFilePointerListener listener) |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
boolean |
equals(java.lang.Object o) |
VirtualFilePointer |
findByUrl(java.lang.String url) |
VirtualFile [] |
getDirectories() |
VirtualFile [] |
getFiles() |
java.util.List<Pair<java.lang.String,java.lang.Boolean>> |
getJarDirectories()
Returns list of (directory url, isRecursive) which were added via
VirtualFilePointerContainer.addJarDirectory(String, boolean) } |
java.util.List<VirtualFilePointer> |
getList() |
java.lang.String [] |
getUrls() |
int |
hashCode() |
boolean |
isEmpty() |
void |
killAll() |
void |
moveDown(java.lang.String url) |
void |
moveUp(java.lang.String url) |
void |
readExternal(Element rootChild,
java.lang.String childName,
boolean externalizeJarDirectories)
For example, to read from the xml below, call
readExternal(myRootTag, "childElementName"); |
void |
remove(VirtualFilePointer pointer) |
boolean |
removeJarDirectory(java.lang.String directoryUrl)
Removes
directory from the roots of jar files. |
int |
size() |
java.lang.String |
toString() |
void |
writeExternal(Element element,
java.lang.String childElementName,
boolean externalizeJarDirectories) |
getStackTrace, kill, killExceptionally, throwDisposalError, throwObjectNotDisposedError
public static final java.lang.String URL_ATTR
public static final java.lang.String JAR_DIRECTORY_ELEMENT
public static final java.lang.String RECURSIVE_ATTR
public void readExternal(Element rootChild, java.lang.String childName, boolean externalizeJarDirectories) throws InvalidDataException
VirtualFilePointerContainer
readExternal(myRootTag, "childElementName");
<myroot>
<childElementName url="xxx1"/>
<childElementName url="xxx2"/>
</myroot>
readExternal
in interface VirtualFilePointerContainer
InvalidDataException
public void writeExternal(Element element, java.lang.String childElementName, boolean externalizeJarDirectories)
writeExternal
in interface VirtualFilePointerContainer
public void moveUp(java.lang.String url)
moveUp
in interface VirtualFilePointerContainer
public void moveDown(java.lang.String url)
moveDown
in interface VirtualFilePointerContainer
public void killAll()
killAll
in interface VirtualFilePointerContainer
public void add(VirtualFile file)
add
in interface VirtualFilePointerContainer
public void add(java.lang.String url)
add
in interface VirtualFilePointerContainer
public void remove(VirtualFilePointer pointer)
remove
in interface VirtualFilePointerContainer
public java.util.List<VirtualFilePointer> getList()
getList
in interface VirtualFilePointerContainer
public void addAll(VirtualFilePointerContainer that)
addAll
in interface VirtualFilePointerContainer
public void addAll(java.util.Collection<java.lang.String> urls)
public java.lang.String [] getUrls()
getUrls
in interface VirtualFilePointerContainer
public boolean isEmpty()
isEmpty
in interface VirtualFilePointerContainer
public VirtualFile [] getFiles()
getFiles
in interface VirtualFilePointerContainer
public VirtualFile [] getDirectories()
getDirectories
in interface VirtualFilePointerContainer
public VirtualFilePointer findByUrl(java.lang.String url)
findByUrl
in interface VirtualFilePointerContainer
public void clear()
clear
in interface VirtualFilePointerContainer
public int size()
size
in interface VirtualFilePointerContainer
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public VirtualFilePointerContainer clone(Disposable parent)
clone
in interface VirtualFilePointerContainer
public VirtualFilePointerContainer clone(Disposable parent, VirtualFilePointerListener listener)
clone
in interface VirtualFilePointerContainer
public void dispose()
Disposable
dispose
in interface Disposable
public void addJarDirectory(java.lang.String directoryUrl, boolean recursively)
VirtualFilePointerContainer
directory
as a root of jar files.
After this call the VirtualFilePointerContainer.getFiles()
will additionally return jar files in this directory
(and, if recursively
was set, the jar files in all-subdirectories).
VirtualFilePointerContainer.getUrls()
will additionally return the directoryUrl
.addJarDirectory
in interface VirtualFilePointerContainer
public void addAllJarDirectories(java.util.Collection<java.lang.String> directoryUrls, boolean recursively)
addJarDirectory(String, boolean)
one by onepublic boolean removeJarDirectory(java.lang.String directoryUrl)
VirtualFilePointerContainer
directory
from the roots of jar files.
After that the VirtualFilePointerContainer.getFiles()
and VirtualFilePointerContainer.getUrls()
etc will not return jar files in this directory anymore.removeJarDirectory
in interface VirtualFilePointerContainer
public java.util.List<Pair<java.lang.String,java.lang.Boolean>> getJarDirectories()
VirtualFilePointerContainer
VirtualFilePointerContainer.addJarDirectory(String, boolean)
}getJarDirectories
in interface VirtualFilePointerContainer