Class DefaultMojoAnnotationsScanner

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private void analyzeClassStream​(java.util.Map<java.lang.String,​MojoAnnotatedClass> mojoAnnotatedClasses, java.io.InputStream is, org.apache.maven.artifact.Artifact artifact, boolean excludeMojo, java.lang.String source, java.lang.String file)  
      protected void analyzeVisitors​(MojoClassVisitor mojoClassVisitor)  
      protected void populateAnnotationContent​(java.lang.Object content, MojoAnnotationVisitor mojoAnnotationVisitor)  
      protected void scan​(java.util.Map<java.lang.String,​MojoAnnotatedClass> mojoAnnotatedClasses, java.io.File source, java.util.List<java.lang.String> includePatterns, org.apache.maven.artifact.Artifact artifact, boolean excludeMojo)  
      java.util.Map<java.lang.String,​MojoAnnotatedClass> scan​(MojoAnnotationsScannerRequest request)
      Scan classes for mojo annotations.
      protected java.util.Map<java.lang.String,​MojoAnnotatedClass> scanArchive​(java.io.File archiveFile, org.apache.maven.artifact.Artifact artifact, boolean excludeMojo)  
      protected java.util.Map<java.lang.String,​MojoAnnotatedClass> scanDirectory​(java.io.File classDirectory, java.util.List<java.lang.String> includePatterns, org.apache.maven.artifact.Artifact artifact, boolean excludeMojo)  
      • Methods inherited from class org.codehaus.plexus.logging.AbstractLogEnabled

        enableLogging, getLogger, setupLogger, setupLogger, setupLogger
      • Methods inherited from class java.lang.Object

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

      • SCANNABLE_CLASS

        private static final java.util.regex.Pattern SCANNABLE_CLASS
      • reflector

        private org.codehaus.plexus.util.reflection.Reflector reflector
    • Constructor Detail

      • DefaultMojoAnnotationsScanner

        public DefaultMojoAnnotationsScanner()
    • Method Detail

      • scan

        protected void scan​(java.util.Map<java.lang.String,​MojoAnnotatedClass> mojoAnnotatedClasses,
                            java.io.File source,
                            java.util.List<java.lang.String> includePatterns,
                            org.apache.maven.artifact.Artifact artifact,
                            boolean excludeMojo)
                     throws java.io.IOException,
                            ExtractionException
        Throws:
        java.io.IOException
        ExtractionException
      • scanArchive

        protected java.util.Map<java.lang.String,​MojoAnnotatedClass> scanArchive​(java.io.File archiveFile,
                                                                                       org.apache.maven.artifact.Artifact artifact,
                                                                                       boolean excludeMojo)
                                                                                throws java.io.IOException,
                                                                                       ExtractionException
        Parameters:
        archiveFile -
        artifact -
        excludeMojo - for dependencies, we exclude Mojo annotations found
        Returns:
        annotated classes found
        Throws:
        java.io.IOException
        ExtractionException
      • scanDirectory

        protected java.util.Map<java.lang.String,​MojoAnnotatedClass> scanDirectory​(java.io.File classDirectory,
                                                                                         java.util.List<java.lang.String> includePatterns,
                                                                                         org.apache.maven.artifact.Artifact artifact,
                                                                                         boolean excludeMojo)
                                                                                  throws java.io.IOException,
                                                                                         ExtractionException
        Parameters:
        classDirectory -
        includePatterns -
        artifact -
        excludeMojo - for dependencies, we exclude Mojo annotations found
        Returns:
        annotated classes found
        Throws:
        java.io.IOException
        ExtractionException
      • analyzeClassStream

        private void analyzeClassStream​(java.util.Map<java.lang.String,​MojoAnnotatedClass> mojoAnnotatedClasses,
                                        java.io.InputStream is,
                                        org.apache.maven.artifact.Artifact artifact,
                                        boolean excludeMojo,
                                        java.lang.String source,
                                        java.lang.String file)
                                 throws java.io.IOException,
                                        ExtractionException
        Throws:
        java.io.IOException
        ExtractionException
      • populateAnnotationContent

        protected void populateAnnotationContent​(java.lang.Object content,
                                                 MojoAnnotationVisitor mojoAnnotationVisitor)
                                          throws org.codehaus.plexus.util.reflection.ReflectorException
        Throws:
        org.codehaus.plexus.util.reflection.ReflectorException