Package org.apache.maven.tools.plugin.annotations.datamodel

Examples of org.apache.maven.tools.plugin.annotations.datamodel.ParameterAnnotationContent


            // @Parameter annotations
            List<MojoFieldVisitor> mojoFieldVisitors = mojoClassVisitor.findFieldWithAnnotation( Parameter.class );
            for ( MojoFieldVisitor mojoFieldVisitor : mojoFieldVisitors )
            {
                ParameterAnnotationContent parameterAnnotationContent =
                    new ParameterAnnotationContent( mojoFieldVisitor.getFieldName(), mojoFieldVisitor.getClassName() );
                if ( mojoFieldVisitor.getMojoAnnotationVisitor() != null )
                {
                    populateAnnotationContent( parameterAnnotationContent, mojoFieldVisitor.getMojoAnnotationVisitor() );
                }

                mojoAnnotatedClass.getParameters().put( parameterAnnotationContent.getFieldName(),
                                                        parameterAnnotationContent );
            }

            // @Component annotations
            mojoFieldVisitors = mojoClassVisitor.findFieldWithAnnotation( Component.class );
View Full Code Here


                if ( javaField == null )
                {
                    continue;
                }

                ParameterAnnotationContent parameterAnnotationContent = parameter.getValue();
                parameterAnnotationContent.setDescription( javaField.getComment() );

                DocletTag deprecated = javaField.getTagByName( "deprecated" );
                if ( deprecated != null )
                {
                    parameterAnnotationContent.setDeprecated( deprecated.getValue() );
                }

                DocletTag since = javaField.getTagByName( "since" );
                if ( since != null )
                {
                    parameterAnnotationContent.setSince( since.getValue() );
                }
            }

            // populate components
            for ( Map.Entry<String, ComponentAnnotationContent> component : entry.getValue().getComponents().entrySet() )
View Full Code Here

            List<MojoFieldVisitor> mojoFieldVisitors =
                mojoClassVisitor.findFieldWithAnnotationClass( Parameter.class.getName() );

            for ( MojoFieldVisitor mojoFieldVisitor : mojoFieldVisitors )
            {
                ParameterAnnotationContent parameterAnnotationContent =
                    new ParameterAnnotationContent( mojoFieldVisitor.getFieldName(), mojoFieldVisitor.getClassName() );
                if ( mojoFieldVisitor.getMojoAnnotationVisitor() != null )
                {
                    for ( Map.Entry<String, Object> entry : mojoFieldVisitor.getMojoAnnotationVisitor().getAnnotationValues().entrySet() )
                    {
                        reflector.invoke( parameterAnnotationContent, entry.getKey(),
                                          new Object[]{ entry.getValue() } );
                    }

                }
                mojoClassVisitor.getMojoAnnotatedClass().getParameters().put( parameterAnnotationContent.getFieldName(),
                                                                              parameterAnnotationContent );
            }

            mojoFieldVisitors = mojoClassVisitor.findFieldWithAnnotationClass( Component.class.getName() );
View Full Code Here

                if ( javaField == null )
                {
                    continue;
                }

                ParameterAnnotationContent parameterAnnotationContent = parameter.getValue();
                parameterAnnotationContent.setDescription( javaField.getComment() );

                DocletTag deprecated = javaField.getTagByName( "deprecated" );
                if ( deprecated != null )
                {
                    parameterAnnotationContent.setDeprecated( deprecated.getValue() );
                }

                DocletTag since = javaField.getTagByName( "since" );
                if ( since != null )
                {
                    parameterAnnotationContent.setSince( since.getValue() );
                }
            }

            // populate components
            for ( Map.Entry<String, ComponentAnnotationContent> component : entry.getValue().getComponents().entrySet() )
View Full Code Here

                if ( javaField == null )
                {
                    continue;
                }

                ParameterAnnotationContent parameterAnnotationContent = parameter.getValue();
                parameterAnnotationContent.setDescription( javaField.getComment() );

                DocletTag deprecated = javaField.getTagByName( "deprecated" );
                if ( deprecated != null )
                {
                    parameterAnnotationContent.setDeprecated( deprecated.getValue() );
                }

                DocletTag since = javaField.getTagByName( "since" );
                if ( since != null )
                {
                    parameterAnnotationContent.setSince( since.getValue() );
                }
            }

            // populate components
            for ( Map.Entry<String, ComponentAnnotationContent> component : entry.getValue().getComponents().entrySet() )
View Full Code Here

        Collection<ComponentAnnotationContent> components = mojoAnnotatedClass.getComponents().values();
        Assertions.assertThat( components ).isNotNull().isNotEmpty().hasSize( 2 );

        Collection<ParameterAnnotationContent> parameters = mojoAnnotatedClass.getParameters().values();
        Assertions.assertThat( parameters ).isNotNull().isNotEmpty().hasSize( 2 ).contains(
            new ParameterAnnotationContent( "bar", null, "thebar", "coolbar", true, false, String.class.getName() ),
            new ParameterAnnotationContent( "beer", null, "thebeer", "coolbeer", false, false,
                                            String.class.getName() ) );
    }
View Full Code Here

            List<MojoFieldVisitor> mojoFieldVisitors =
                mojoClassVisitor.findFieldWithAnnotationClass( Parameter.class.getName() );

            for ( MojoFieldVisitor mojoFieldVisitor : mojoFieldVisitors )
            {
                ParameterAnnotationContent parameterAnnotationContent =
                    new ParameterAnnotationContent( mojoFieldVisitor.getFieldName(), mojoFieldVisitor.getClassName() );
                if ( mojoFieldVisitor.getMojoAnnotationVisitor() != null )
                {
                    for ( Map.Entry<String, Object> entry : mojoFieldVisitor.getMojoAnnotationVisitor().getAnnotationValues().entrySet() )
                    {
                        reflector.invoke( parameterAnnotationContent, entry.getKey(),
                                          new Object[]{ entry.getValue() } );
                    }

                }
                mojoClassVisitor.getMojoAnnotatedClass().getParameters().put( parameterAnnotationContent.getFieldName(),
                                                                              parameterAnnotationContent );
            }

            mojoFieldVisitors = mojoClassVisitor.findFieldWithAnnotationClass( Component.class.getName() );
View Full Code Here

                if ( javaField == null )
                {
                    continue;
                }

                ParameterAnnotationContent parameterAnnotationContent = parameter.getValue();
                parameterAnnotationContent.setDescription( javaField.getComment() );

                DocletTag deprecated = javaField.getTagByName( "deprecated" );
                if ( deprecated != null )
                {
                    parameterAnnotationContent.setDeprecated( deprecated.getValue() );
                }

                DocletTag since = javaField.getTagByName( "since" );
                if ( since != null )
                {
                    parameterAnnotationContent.setSince( since.getValue() );
                }
            }

            // populate components
            for ( Map.Entry<String, ComponentAnnotationContent> component : entry.getValue().getComponents().entrySet() )
View Full Code Here

TOP

Related Classes of org.apache.maven.tools.plugin.annotations.datamodel.ParameterAnnotationContent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.