Package org.apache.felix.ipojo.manipulator.metadata.annotation.model.literal

Examples of org.apache.felix.ipojo.manipulator.metadata.annotation.model.literal.AnnotationPlayback


    public void testSimpleValuesPlayback() throws Exception {

        when(visitor.visitAnnotation(anyString(), anyBoolean())).thenReturn(annotationVisitor);

        AnnotationPlayback playback = new AnnotationPlayback(find(SimpleTypes.class));
        playback.accept(visitor);

        verify(visitor).visitAnnotation(Type.getType(SimpleTypes.class).getDescriptor(),
                                        true);
        verify(annotationVisitor).visitEnd();
View Full Code Here


    public void testEnumValuesPlayback() throws Exception {

        when(visitor.visitAnnotation(anyString(), anyBoolean())).thenReturn(annotationVisitor);

        AnnotationPlayback playback = new AnnotationPlayback(find(EnumAnnotation.class));
        playback.accept(visitor);

        verify(visitor).visitAnnotation(Type.getType(EnumAnnotation.class).getDescriptor(),
                                        true);
        verify(annotationVisitor).visitEnd();
View Full Code Here

        when(annotationVisitor.visitArray("arrayOfEnum")).thenReturn(arrayOfEnum);
        when(annotationVisitor.visitArray("arrayOfClass")).thenReturn(arrayOfClass);
        when(annotationVisitor.visitArray("arrayOfAnnotation")).thenReturn(arrayOfAnnotation);
        when(annotationVisitor.visitArray("emptyArray")).thenReturn(emptyArray);

        AnnotationPlayback playback = new AnnotationPlayback(find(ArrayAnnotation.class));
        playback.accept(visitor);

        verify(visitor).visitAnnotation(Type.getType(ArrayAnnotation.class).getDescriptor(),
                                        true);
        verify(annotationVisitor).visitEnd();
View Full Code Here

        when(annotationVisitor.visitAnnotation("value", Type.getType(InnerAnnotation.class).getDescriptor()))
                .thenReturn(innerAnnotationVisitor);
        when(innerAnnotationVisitor.visitArray("arrayOfClass"))
                .thenReturn(arrayVisitor);

        AnnotationPlayback playback = new AnnotationPlayback(find(AnnotationAnnotation.class));
        playback.accept(visitor);

        verify(visitor).visitAnnotation(Type.getType(AnnotationAnnotation.class).getDescriptor(),
                                        true);
        verify(annotationVisitor).visitEnd();
View Full Code Here

            binding.setFactory(new StereotypeVisitorFactory(m_annotationType));
            bindings.add(binding);
        }

        public StereotypeBindingBuilder with(AnnotationLiteral<?> literal) {
            m_annotationType.getPlaybacks().add(new AnnotationPlayback(literal));
            return this;
        }
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.manipulator.metadata.annotation.model.literal.AnnotationPlayback

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.