Package org.jboss.vfs
Class VisitorAttributes
java.lang.Object
org.jboss.vfs.VisitorAttributes
- Direct Known Subclasses:
IncludeExcludeVisitorAttributes
,VisitorAttributes.ImmutableVisitorAttributes
Attributes used when visiting a virtual file system
- Version:
- $Revision: 1.1 $
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
private static class
Immutable version of the attribues -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VisitorAttributes
The default attributes - visit leaves and non-leaves, no recursion, no rootprivate boolean
Whether to ignore individual file errorsprivate boolean
Whether to include hidden filesprivate boolean
Whether to include the rootstatic final VisitorAttributes
Visit leaves only and do not recurse non-leaf filesprivate boolean
Whether to only visit leavesstatic final VisitorAttributes
Recurse and visit all non-leaf filesstatic final VisitorAttributes.AcceptAnyFilter
A VirtualFileFilter than accepts any filestatic final VisitorAttributes
Recurse all non-leaf files but only visit leavesprivate VirtualFileFilter
A filter used to control whether a non-leaf is recursive visited -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the recurse filter.boolean
Whether to ignore individual errorsboolean
Whether to include hidden filesboolean
Whether to include the root of the visitboolean
Whether to visit leaves onlyboolean
isRecurse
(VirtualFile file) Whether to recurse into the non-leaf filevoid
setIgnoreErrors
(boolean ignoreErrors) Set the ignoreErrors.void
setIncludeHidden
(boolean includeHidden) Set the includeHidden.void
setIncludeRoot
(boolean includeRoot) Set the includeRoot.void
setLeavesOnly
(boolean leavesOnly) Set the leaves only.void
setRecurseFilter
(VirtualFileFilter filter) Set the recurse filter.
-
Field Details
-
RECURSE_ALL
A VirtualFileFilter than accepts any file -
DEFAULT
The default attributes - visit leaves and non-leaves, no recursion, no root -
LEAVES_ONLY
Visit leaves only and do not recurse non-leaf files -
RECURSE
Recurse and visit all non-leaf files -
RECURSE_LEAVES_ONLY
Recurse all non-leaf files but only visit leaves -
includeRoot
private boolean includeRootWhether to include the root -
leavesOnly
private boolean leavesOnlyWhether to only visit leaves -
ignoreErrors
private boolean ignoreErrorsWhether to ignore individual file errors -
includeHidden
private boolean includeHiddenWhether to include hidden files -
recurseFilter
A filter used to control whether a non-leaf is recursive visited
-
-
Constructor Details
-
VisitorAttributes
public VisitorAttributes()
-
-
Method Details
-
isLeavesOnly
public boolean isLeavesOnly()Whether to visit leaves only- Returns:
- the visit leaves only.
-
setLeavesOnly
public void setLeavesOnly(boolean leavesOnly) Set the leaves only.- Parameters:
leavesOnly
- the leaves only- Throws:
IllegalStateException
- if you attempt to modify one of the preconfigured static values of this class
-
isRecurse
Whether to recurse into the non-leaf file. If there is a recurse filter then the result will by its accepts(file) value.
Default: false- Parameters:
file
- the file- Returns:
- the recurse flag.
-
getRecurseFilter
Get the recurse filter.- Returns:
- the current recurse filter.
-
setRecurseFilter
Set the recurse filter.- Parameters:
filter
- - the recurse filter.- Throws:
IllegalStateException
- if you attempt to modify one of the preconfigured static values of this class
-
isIncludeRoot
public boolean isIncludeRoot()Whether to include the root of the visit- Returns:
- the includeRoot.
-
setIncludeRoot
public void setIncludeRoot(boolean includeRoot) Set the includeRoot.- Parameters:
includeRoot
- the includeRoot.- Throws:
IllegalStateException
- if you attempt to modify one of the preconfigured static values of this class
-
isIgnoreErrors
public boolean isIgnoreErrors()Whether to ignore individual errors- Returns:
- the ignoreErrors.
-
setIgnoreErrors
public void setIgnoreErrors(boolean ignoreErrors) Set the ignoreErrors.- Parameters:
ignoreErrors
- the ignoreErrors.- Throws:
IllegalStateException
- if you attempt to modify one of the preconfigured static values of this class
-
isIncludeHidden
public boolean isIncludeHidden()Whether to include hidden files- Returns:
- the includeHidden.
-
setIncludeHidden
public void setIncludeHidden(boolean includeHidden) Set the includeHidden.- Parameters:
includeHidden
- the includeHidden.- Throws:
IllegalStateException
- if you attempt to modify one of the preconfigured static values of this class
-