Examples of annotatedWith()


Examples of com.google.inject.binder.AnnotatedConstantBindingBuilder.annotatedWith()

  public void testBindConstantWithMultipleAnnotationsAddsError() {
    checkModule(
        new AbstractModule() {
          protected void configure() {
            AnnotatedConstantBindingBuilder cbb = bindConstant();
            cbb.annotatedWith(SampleAnnotation.class).to("A");
            cbb.annotatedWith(Names.named("A"));
          }
        },

        new FailingElementVisitor() {
View Full Code Here

Examples of com.google.inject.binder.AnnotatedConstantBindingBuilder.annotatedWith()

    checkModule(
        new AbstractModule() {
          protected void configure() {
            AnnotatedConstantBindingBuilder cbb = bindConstant();
            cbb.annotatedWith(SampleAnnotation.class).to("A");
            cbb.annotatedWith(Names.named("A"));
          }
        },

        new FailingElementVisitor() {
          @Override public <T> Void visit(Binding<T> command) {
View Full Code Here

Examples of org.apache.onami.test.annotation.Mock.annotatedWith()

            for ( final Field field : fields )
            {
                final TypeLiteral literal = TypeLiteral.get( type );
                final Mock annoBy = field.getAnnotation( Mock.class );
                final Object mock = this.mockedFields.get( field );
                if ( annoBy.annotatedWith() != Mock.NoAnnotation.class )
                {
                    bind( literal ).annotatedWith( annoBy.annotatedWith() ).toInstance( mock );
                }
                else if ( !"".equals( annoBy.namedWith() ) )
                {
View Full Code Here

Examples of org.apache.onami.test.annotation.Mock.annotatedWith()

                final TypeLiteral literal = TypeLiteral.get( type );
                final Mock annoBy = field.getAnnotation( Mock.class );
                final Object mock = this.mockedFields.get( field );
                if ( annoBy.annotatedWith() != Mock.NoAnnotation.class )
                {
                    bind( literal ).annotatedWith( annoBy.annotatedWith() ).toInstance( mock );
                }
                else if ( !"".equals( annoBy.namedWith() ) )
                {
                    bind( literal ).annotatedWith( Names.named( annoBy.namedWith() ) ).toInstance( mock );
                }
View Full Code Here

Examples of org.apache.onami.test.annotation.Mock.annotatedWith()

        for ( Field field : fields )
        {
            final Mock annoBy = field.getAnnotation( Mock.class );

            if ( annoBy.annotatedWith() == Mock.NoAnnotation.class && "".equals( annoBy.namedWith() ) )
            {
                numOfSimpleType++;
            }
            if ( numOfSimpleType > 1 )
            {
View Full Code Here

Examples of org.apache.onami.test.annotation.Mock.annotatedWith()

            {
                LOGGER.finer( "Found multiple simple type" );
                return true;
            }

            if ( annoBy.annotatedWith() != Mock.NoAnnotation.class )
            {
                if ( !listAnnotatedType.contains( annoBy.annotatedWith() ) )
                {
                    listAnnotatedType.add( annoBy.annotatedWith() );
                }
View Full Code Here

Examples of org.apache.onami.test.annotation.Mock.annotatedWith()

                return true;
            }

            if ( annoBy.annotatedWith() != Mock.NoAnnotation.class )
            {
                if ( !listAnnotatedType.contains( annoBy.annotatedWith() ) )
                {
                    listAnnotatedType.add( annoBy.annotatedWith() );
                }
                else
                {
View Full Code Here

Examples of org.apache.onami.test.annotation.Mock.annotatedWith()

            if ( annoBy.annotatedWith() != Mock.NoAnnotation.class )
            {
                if ( !listAnnotatedType.contains( annoBy.annotatedWith() ) )
                {
                    listAnnotatedType.add( annoBy.annotatedWith() );
                }
                else
                {
                    // found two fields with same annotation
                    LOGGER.finer( "Found multiple annotatedBy type" );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.