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 classprivate static classImmutable version of the attribues -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final VisitorAttributesThe default attributes - visit leaves and non-leaves, no recursion, no rootprivate booleanWhether to ignore individual file errorsprivate booleanWhether to include hidden filesprivate booleanWhether to include the rootstatic final VisitorAttributesVisit leaves only and do not recurse non-leaf filesprivate booleanWhether to only visit leavesstatic final VisitorAttributesRecurse and visit all non-leaf filesstatic final VisitorAttributes.AcceptAnyFilterA VirtualFileFilter than accepts any filestatic final VisitorAttributesRecurse all non-leaf files but only visit leavesprivate VirtualFileFilterA filter used to control whether a non-leaf is recursive visited -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the recurse filter.booleanWhether to ignore individual errorsbooleanWhether to include hidden filesbooleanWhether to include the root of the visitbooleanWhether to visit leaves onlybooleanisRecurse(VirtualFile file) Whether to recurse into the non-leaf filevoidsetIgnoreErrors(boolean ignoreErrors) Set the ignoreErrors.voidsetIncludeHidden(boolean includeHidden) Set the includeHidden.voidsetIncludeRoot(boolean includeRoot) Set the includeRoot.voidsetLeavesOnly(boolean leavesOnly) Set the leaves only.voidsetRecurseFilter(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
Default: false- 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
Default: false- 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
Default: false- 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
Default: false- 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
-