Class Mapper

  • All Implemented Interfaces:
    java.io.Serializable

    public class Mapper
    extends java.lang.Object
    implements java.io.Serializable
    Class Mapper.
    Version:
    $Revision$ $Date$
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String classname
      Allows specification of a custom mapper implementation.
      private java.lang.String from
      Specifies a type-specific pattern for matching source paths which should be mapped.
      private java.lang.String to
      Specifies a type-specific pattern for producing paths based on source paths.
      private java.lang.String type
      Specifies a built-in mapper implementation.
    • Constructor Summary

      Constructors 
      Constructor Description
      Mapper()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getClassname()
      Get allows specification of a custom mapper implementation.
      java.lang.String getFrom()
      Get specifies a type-specific pattern for matching source paths which should be mapped.
      java.lang.String getTo()
      Get specifies a type-specific pattern for producing paths based on source paths.
      java.lang.String getType()
      Get specifies a built-in mapper implementation.
      void setClassname​(java.lang.String classname)
      Set allows specification of a custom mapper implementation.
      void setFrom​(java.lang.String from)
      Set specifies a type-specific pattern for matching source paths which should be mapped.
      void setTo​(java.lang.String to)
      Set specifies a type-specific pattern for producing paths based on source paths.
      void setType​(java.lang.String type)
      Set specifies a built-in mapper implementation.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • type

        private java.lang.String type
        Specifies a built-in mapper implementation.
        Valid values:
        • "flatten" - The target file name is identical to the source file name, with all leading directory information stripped off. Both to and from will be ignored.
        • "glob" - Both to and from define patterns that may contain at most one *. For each source file that matches the from pattern, a target file name will be constructed from the to pattern by substituting the * in the to pattern with the text that matches the * in the from pattern. Source file names that don't match the from pattern will be ignored.
        • "regexp" - Both to and from define regular expressions. If the source file name matches the from pattern, the target file name will be constructed from the to pattern, using \0 to \9 as back-references for the full match (\0) or the matches of the subexpressions in parentheses. Source files not matching the from pattern will be ignored.
        • "merge" - The target file name will always be the same, as defined by to. from will be ignored.
        • "package" - Sharing the same syntax as the glob mapper, the package mapper replaces directory separators found in the matched source pattern with dots in the target pattern placeholder.
        • "unpackage" - This mapper is the inverse of the package mapper. It replaces the dots in a package name with directory separators. This is useful for matching XML formatter results against their JUnit test test cases. The mapper shares the sample syntax as the glob mapper.
      • from

        private java.lang.String from
        Specifies a type-specific pattern for matching source paths which should be mapped.
      • to

        private java.lang.String to
        Specifies a type-specific pattern for producing paths based on source paths.
      • classname

        private java.lang.String classname
        Allows specification of a custom mapper implementation. The class must be of type org.apache.maven.shared.model.fileset.mappers.FileNameMapper, from the artifact org.apache.maven.shared:file-management.
    • Constructor Detail

      • Mapper

        public Mapper()
    • Method Detail

      • getClassname

        public java.lang.String getClassname()
        Get allows specification of a custom mapper implementation. The class must be of type org.apache.maven.shared.model.fileset.mappers.FileNameMapper, from the artifact org.apache.maven.shared:file-management.
        Returns:
        String
      • getFrom

        public java.lang.String getFrom()
        Get specifies a type-specific pattern for matching source paths which should be mapped.
        Returns:
        String
      • getTo

        public java.lang.String getTo()
        Get specifies a type-specific pattern for producing paths based on source paths.
        Returns:
        String
      • getType

        public java.lang.String getType()
        Get specifies a built-in mapper implementation.
        Valid values:
        • "flatten" - The target file name is identical to the source file name, with all leading directory information stripped off. Both to and from will be ignored.
        • "glob" - Both to and from define patterns that may contain at most one *. For each source file that matches the from pattern, a target file name will be constructed from the to pattern by substituting the * in the to pattern with the text that matches the * in the from pattern. Source file names that don't match the from pattern will be ignored.
        • "regexp" - Both to and from define regular expressions. If the source file name matches the from pattern, the target file name will be constructed from the to pattern, using \0 to \9 as back-references for the full match (\0) or the matches of the subexpressions in parentheses. Source files not matching the from pattern will be ignored.
        • "merge" - The target file name will always be the same, as defined by to. from will be ignored.
        • "package" - Sharing the same syntax as the glob mapper, the package mapper replaces directory separators found in the matched source pattern with dots in the target pattern placeholder.
        • "unpackage" - This mapper is the inverse of the package mapper. It replaces the dots in a package name with directory separators. This is useful for matching XML formatter results against their JUnit test test cases. The mapper shares the sample syntax as the glob mapper.
        Returns:
        String
      • setClassname

        public void setClassname​(java.lang.String classname)
        Set allows specification of a custom mapper implementation. The class must be of type org.apache.maven.shared.model.fileset.mappers.FileNameMapper, from the artifact org.apache.maven.shared:file-management.
        Parameters:
        classname -
      • setFrom

        public void setFrom​(java.lang.String from)
        Set specifies a type-specific pattern for matching source paths which should be mapped.
        Parameters:
        from -
      • setTo

        public void setTo​(java.lang.String to)
        Set specifies a type-specific pattern for producing paths based on source paths.
        Parameters:
        to -
      • setType

        public void setType​(java.lang.String type)
        Set specifies a built-in mapper implementation.
        Valid values:
        • "flatten" - The target file name is identical to the source file name, with all leading directory information stripped off. Both to and from will be ignored.
        • "glob" - Both to and from define patterns that may contain at most one *. For each source file that matches the from pattern, a target file name will be constructed from the to pattern by substituting the * in the to pattern with the text that matches the * in the from pattern. Source file names that don't match the from pattern will be ignored.
        • "regexp" - Both to and from define regular expressions. If the source file name matches the from pattern, the target file name will be constructed from the to pattern, using \0 to \9 as back-references for the full match (\0) or the matches of the subexpressions in parentheses. Source files not matching the from pattern will be ignored.
        • "merge" - The target file name will always be the same, as defined by to. from will be ignored.
        • "package" - Sharing the same syntax as the glob mapper, the package mapper replaces directory separators found in the matched source pattern with dots in the target pattern placeholder.
        • "unpackage" - This mapper is the inverse of the package mapper. It replaces the dots in a package name with directory separators. This is useful for matching XML formatter results against their JUnit test test cases. The mapper shares the sample syntax as the glob mapper.
        Parameters:
        type -