Package org.jboss.vfs

Class VisitorAttributes

  • Direct Known Subclasses:
    IncludeExcludeVisitorAttributes

    public class VisitorAttributes
    extends java.lang.Object
    Attributes used when visiting a virtual file system
    Version:
    $Revision: 1.1 $
    Author:
    Adrian Brock, Scott.Stark@jboss.org
    • Field Detail

      • RECURSE_ALL

        public static final org.jboss.vfs.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
    • Constructor Detail

      • VisitorAttributes

        public VisitorAttributes()
    • Method Detail

      • 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:
        java.lang.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:
        java.lang.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:
        java.lang.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:
        java.lang.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:
        java.lang.IllegalStateException - if you attempt to modify one of the preconfigured static values of this class