Examples of types()


Examples of org.apache.commons.weaver.test.beans.ComplexAnnotations.TestAnnotation.types()

        assertSame(SHEMP, anno1.stooge());
        assertArrayEquals(new Stooge[] { MOE, LARRY, CURLY }, anno1.stooges());
        assertEquals("", anno1.string());
        assertArrayEquals(new String[] { "" }, anno1.strings());
        assertEquals(Object.class, anno1.type());
        assertArrayEquals(new Class[] { Object.class }, anno1.types());

        TestAnnotation anno2 = fields.get("dummy2").getAnnotation(TestAnnotation.class);
        assertFalse(anno2.booleanValue());
        assertTrue(Arrays.equals(new boolean[] { false }, anno2.booleanValues()));
        assertEquals((byte) 0, anno2.byteValue());
View Full Code Here

Examples of org.apache.commons.weaver.test.beans.ComplexAnnotations.TestAnnotation.types()

        assertSame(SHEMP, anno2.stooge());
        assertArrayEquals(new Stooge[] { MOE, LARRY, CURLY }, anno2.stooges());
        assertEquals("", anno2.string());
        assertArrayEquals(new String[] { "" }, anno2.strings());
        assertEquals(Object.class, anno2.type());
        assertArrayEquals(new Class[] { Object.class }, anno2.types());
    }

    @Test
    public void testObjectMethods() throws IOException {
        addClassForScanning(ComplexAnnotations.class);
View Full Code Here

Examples of org.apache.wink.server.utils.SystemLinksBuilder.types()

        @Produces("application/atom+xml")
        public String getAtom(@Context LinkBuilders builders) {
            SystemLinksBuilder builder = builders.createSystemLinksBuilder();

            List<SyndLink> links = new ArrayList<SyndLink>();
            builder.types(LinkType.ALTERNATE).build(links);
            assertEquals(3, links.size());
            assertLink(links,
                       "alternate",
                       "application/xml",
                       "systemLinksSelective?alt=application%2Fxml");
View Full Code Here

Examples of org.apache.wink.server.utils.SystemLinksBuilder.types()

                       "alternate",
                       "application/atom+xml",
                       "systemLinksSelective?alt=application%2Fatom%2Bxml");

            links.clear();
            builder.types(LinkType.SELF).build(links);
            assertEquals(1, links.size());
            assertLink(links, "self", null, "systemLinksSelective");

            links.clear();
            builder.types(LinkType.EDIT).build(links);
View Full Code Here

Examples of org.apache.wink.server.utils.SystemLinksBuilder.types()

            builder.types(LinkType.SELF).build(links);
            assertEquals(1, links.size());
            assertLink(links, "self", null, "systemLinksSelective");

            links.clear();
            builder.types(LinkType.EDIT).build(links);
            assertEquals(1, links.size());
            assertLink(links, "edit", null, "systemLinksSelective");

            links.clear();
            builder.types(LinkType.OPENSEARCH).build(links);
View Full Code Here

Examples of org.apache.wink.server.utils.SystemLinksBuilder.types()

            builder.types(LinkType.EDIT).build(links);
            assertEquals(1, links.size());
            assertLink(links, "edit", null, "systemLinksSelective");

            links.clear();
            builder.types(LinkType.OPENSEARCH).build(links);
            assertEquals(1, links.size());
            assertLink(links,
                       "search",
                       "application/opensearchdescription+xml",
                       "systemLinksSelective?alt=application%2Fopensearchdescription%2Bxml");
View Full Code Here

Examples of org.apache.wink.server.utils.SystemLinksBuilder.types()

                       "search",
                       "application/opensearchdescription+xml",
                       "systemLinksSelective?alt=application%2Fopensearchdescription%2Bxml");

            links.clear();
            builder.types(LinkType.SELF, LinkType.EDIT).build(links);
            assertEquals(2, links.size());
            assertLink(links, "self", null, "systemLinksSelective");
            assertLink(links, "edit", null, "systemLinksSelective");

            links.clear();
View Full Code Here

Examples of org.apache.wink.server.utils.SystemLinksBuilder.types()

            assertEquals(2, links.size());
            assertLink(links, "self", null, "systemLinksSelective");
            assertLink(links, "edit", null, "systemLinksSelective");

            links.clear();
            builder.types(LinkType.EDIT, LinkType.OPENSEARCH).build(links);
            assertEquals(2, links.size());
            assertLink(links, "edit", null, "systemLinksSelective");
            assertLink(links,
                       "search",
                       "application/opensearchdescription+xml",
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.core.dom.CompilationUnit.types()

  buff.append(this.source);
  buff.append(lineSeparator).append('}');
  ASTParser parser = ASTParser.newParser(AST.JLS3);
  parser.setSource(buff.toString().toCharArray());
  CompilationUnit compilationUnit = (CompilationUnit) parser.createAST(null);
  TypeDeclaration typeDeclaration = (TypeDeclaration) compilationUnit.types().iterator().next();
  List bodyDeclarations = typeDeclaration.bodyDeclarations();
  if (bodyDeclarations.size() != 0)
    this.createdNode = (ASTNode) bodyDeclarations.iterator().next();
  return buff.toString();
}
View Full Code Here

Examples of org.codehaus.preon.annotation.BoundObject.types()

                    || settings.selectFrom().defaultType() != Void.class) {
                return (Codec<T>) new SelectFromCodec(type, settings
                        .selectFrom(), context, codecFactory,
                        hideChoices(metadata));
            }
            if (settings.types().length == 0) {
                return createCodec(type, context);
            }
            List<Codec<?>> codecs = new ArrayList<Codec<?>>();
            for (Class valueType : settings.types()) {
                codecs.add(codecFactory.create(null, valueType, context));
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.