Class PluginXmlResourceTransformer

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<org.codehaus.plexus.util.xml.Xpp3Dom> mojos  
      static java.lang.String PLUGIN_XML_PATH  
      private long time  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean canTransformResource​(java.lang.String resource)  
      private static java.lang.String getAttribute​(org.codehaus.plexus.util.xml.Xpp3Dom dom, java.lang.String attribute)  
      private java.lang.String getRelocatedClass​(java.lang.String className, java.util.List<Relocator> relocators)  
      (package private) byte[] getTransformedResource()  
      private static java.lang.String getValue​(org.codehaus.plexus.util.xml.Xpp3Dom dom, java.lang.String element)  
      boolean hasTransformedResource()  
      void modifyOutputStream​(java.util.jar.JarOutputStream jos)  
      void processResource​(java.lang.String resource, java.io.InputStream is, java.util.List<Relocator> relocators, long time)
      Transform an individual resource
      private static void setAttribute​(org.codehaus.plexus.util.xml.Xpp3Dom dom, java.lang.String attribute, java.lang.String value)  
      private static void setValue​(org.codehaus.plexus.util.xml.Xpp3Dom dom, java.lang.String element, java.lang.String value)  
      • Methods inherited from class java.lang.Object

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

      • mojos

        private java.util.List<org.codehaus.plexus.util.xml.Xpp3Dom> mojos
      • time

        private long time
    • Constructor Detail

      • PluginXmlResourceTransformer

        public PluginXmlResourceTransformer()
    • Method Detail

      • canTransformResource

        public boolean canTransformResource​(java.lang.String resource)
      • processResource

        public void processResource​(java.lang.String resource,
                                    java.io.InputStream is,
                                    java.util.List<Relocator> relocators,
                                    long time)
                             throws java.io.IOException
        Description copied from interface: ReproducibleResourceTransformer
        Transform an individual resource
        Parameters:
        resource - The resource name
        is - An input stream for the resource, the implementation should *not* close this stream
        relocators - A list of relocators
        time - the time of the resource to process
        Throws:
        java.io.IOException - When the IO blows up
      • modifyOutputStream

        public void modifyOutputStream​(java.util.jar.JarOutputStream jos)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • hasTransformedResource

        public boolean hasTransformedResource()
      • getTransformedResource

        byte[] getTransformedResource()
                               throws java.io.IOException
        Throws:
        java.io.IOException
      • getRelocatedClass

        private java.lang.String getRelocatedClass​(java.lang.String className,
                                                   java.util.List<Relocator> relocators)
      • getValue

        private static java.lang.String getValue​(org.codehaus.plexus.util.xml.Xpp3Dom dom,
                                                 java.lang.String element)
      • setValue

        private static void setValue​(org.codehaus.plexus.util.xml.Xpp3Dom dom,
                                     java.lang.String element,
                                     java.lang.String value)
      • getAttribute

        private static java.lang.String getAttribute​(org.codehaus.plexus.util.xml.Xpp3Dom dom,
                                                     java.lang.String attribute)
      • setAttribute

        private static void setAttribute​(org.codehaus.plexus.util.xml.Xpp3Dom dom,
                                         java.lang.String attribute,
                                         java.lang.String value)