Class PathRegEx

Object
AnchorBean<PathPrefixer>
PathPrefixer
PathPrefixerAvoidResolve
PathRegEx

public class PathRegEx extends PathPrefixerAvoidResolve
Matches a regex against incoming file-paths to form a prefix for output

Groups (i.e. parentheses) in the regular expression each form a directory in the output

Author:
Owen Feehan
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    RegEx
    Regular expression to use to match path with at least one group in it.
    DirectoryWithPrefix
    outFilePrefixFromPath(NamedPath path, Path root, PathPrefixerContext context)
     
    void
    setRegEx(RegEx regEx)
    Regular expression to use to match path with at least one group in it.

    Methods inherited from class org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixerAvoidResolve

    getPrefix, outFilePrefix, outFilePrefixAvoidResolve, rootDirectoryPrefix, rootDirectoryPrefixAvoidResolve, setPrefix

    Methods inherited from class org.anchoranalysis.io.output.bean.path.prefixer.PathPrefixer

    resolvePath, resolvePath

    Methods inherited from class org.anchoranalysis.bean.AnchorBean

    checkMisconfigured, describeBean, describeChildren, duplicateBean, fields, findFieldsOfClass, getBeanName, getLocalPath, localise, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PathRegEx

      public PathRegEx()
  • Method Details

    • outFilePrefixFromPath

      public DirectoryWithPrefix outFilePrefixFromPath(NamedPath path, Path root, PathPrefixerContext context) throws PathPrefixerException
      Specified by:
      outFilePrefixFromPath in class PathPrefixerAvoidResolve
      Throws:
      PathPrefixerException
    • getRegEx

      public RegEx getRegEx()
      Regular expression to use to match path with at least one group in it.
    • setRegEx

      public void setRegEx(RegEx regEx)
      Regular expression to use to match path with at least one group in it.