Package org.jboss.vfs

Class VisitorAttributes

java.lang.Object
org.jboss.vfs.VisitorAttributes
Direct Known Subclasses:
IncludeExcludeVisitorAttributes, VisitorAttributes.ImmutableVisitorAttributes

public class VisitorAttributes extends Object
Attributes used when visiting a virtual file system
Version:
$Revision: 1.1 $
  • Field Details

    • RECURSE_ALL

      public static final VisitorAttributes.AcceptAnyFilter RECURSE_ALL
      A VirtualFileFilter than accepts any file
    • DEFAULT

      public static final VisitorAttributes DEFAULT
      The default attributes - visit leaves and non-leaves, no recursion, no root
    • LEAVES_ONLY

      public static final VisitorAttributes LEAVES_ONLY
      Visit leaves only and do not recurse non-leaf files
    • RECURSE

      public static final VisitorAttributes RECURSE
      Recurse and visit all non-leaf files
    • RECURSE_LEAVES_ONLY

      public static final VisitorAttributes RECURSE_LEAVES_ONLY
      Recurse all non-leaf files but only visit leaves
    • includeRoot

      private boolean includeRoot
      Whether to include the root
    • leavesOnly

      private boolean leavesOnly
      Whether to only visit leaves
    • ignoreErrors

      private boolean ignoreErrors
      Whether to ignore individual file errors
    • includeHidden

      private boolean includeHidden
      Whether to include hidden files
    • recurseFilter

      private VirtualFileFilter 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

      public boolean isRecurse(VirtualFile file)
      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

      public VirtualFileFilter getRecurseFilter()
      Get the recurse filter.
      Returns:
      the current recurse filter.
    • setRecurseFilter

      public void setRecurseFilter(VirtualFileFilter filter)
      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