Examples of Name


Examples of org.jboss.seam.annotations.Name

         }

         try {
           //get the class implied by the namespaced XML element name
           Class<Object> clazz = Reflections.classForName(className);
           Name nameAnnotation = clazz.getAnnotation(Name.class);

           //if the name attribute is not explicitly specified in the XML,
           //imply the name from the @Name annotation on the class implied
           //by the XML element name
           if (name == null && nameAnnotation!=null) {
             name = nameAnnotation.value();
           }

           //if this class already has the @Name annotation, the XML element
           //is just adding configuration to the existing component, don't
           //add another ComponentDescriptor (this is super-important to
           //allow overriding!)
           if (nameAnnotation!=null && nameAnnotation.value().equals(name)) {
             Install install = clazz.getAnnotation(Install.class);
             if (install == null || install.value()) {
               className = null;
             }
           }
View Full Code Here

Examples of org.jboss.test.annotation.factory.support.Name

   public void testEquals()
      throws Exception
   {
      String expr = "@"+Name.class.getName() + "(type=\"type\",subtype=\"subtype\")";
      Name n0 = (Name) AnnotationCreator.createAnnotation(expr, Name.class);
      getLog().debug("n0: "+n0);
      Name n1 = NameDefaults.class.getAnnotation(Name.class);
      getLog().debug("n1: "+n1);
      assertEquals(n0, n1);
      assertEquals(n1, n0);

      Name defaultName = NameDefaults.defaultNameType();
      getLog().debug("defaultName: "+defaultName);
      // The jdk annotation should not equal the defaultName
      assertFalse(n1+" != "+defaultName, n1.equals(defaultName));
      assertFalse(defaultName+" != "+n1, defaultName.equals(n1));
      // The AnnotationCreator annotation should not equal the defaultName
      assertFalse(n0+" != "+defaultName, n0.equals(defaultName));
      assertFalse(defaultName+" != "+n0, defaultName.equals(n0));

      Name n2 = new NameImpl("type", "subtype");
      getLog().debug("n2: " + n2);
      assertEquals(n0, n2);
      assertEquals(n2, n0);
      assertEquals(n1, n2);
      assertEquals(n2, n1);

      Name n3 = new NameImpl();
      assertFalse(n0  + "!=" +  n3, n0.equals(n3));
      assertFalse(n3  + "!=" +  n0, n3.equals(n0));
      assertFalse(n1  + "!=" +  n3, n1.equals(n3));
      assertFalse(n3  + "!=" +  n1, n3.equals(n1));           
   }
View Full Code Here

Examples of org.jboss.test.hibernate.model.Name

         {
            service = home.create();

            User user = new User();
            user.setEmail("nobody@nowhere.com");
            user.setName( new Name() );
            user.getName().setFirstName("John");
            user.getName().setInitial( new Character('Q') );
            user.getName().setLastName("Public");
            user.setPassword("password");
            user.setTimeOfCreation( new GregorianCalendar() );
            user.setHandle("myHandle");

            Long savedUserId = service.storeUser( user ).getId();
            getLog().info("User created with id = " + savedUserId );

            // make *sure* it gets loaded into cache.  This is to check
            // that JBossCache as 2nd-level cache is properly releasing
            // resources on SF shutdown; I have manually verified this is
            // the case w/o JBossCache as the 2nd-level cache (i.e. this
            // test case passes w/o JBossCache in the mix).
            List users = service.listUsers();
            assertNotNull( users );
            assertEquals( "Incorrect result size", 1, users.size() );
         }
         finally
         {
            if ( service != null )
            {
               try
               {
                  service.remove();
               }
               catch( Throwable t )
               {
               }
            }
         }
      }
      catch( Throwable t )
      {
         // ignore; does not really matter if this stuff fails/succeeds
         // simply store the original failure so that we can use it later
         initialThrowable = t;
      }

      // force a redeploy
      delegate.redeploy( "hib-test.ear" );

      // then, do some more work...
      ProfileServiceHome home = ProfileServiceUtil.getHome();
      ProfileService service = null;
      try
      {
         service = home.create();

         User user = new User();
         user.setEmail("nobody@nowhere.com");
         user.setName( new Name() );
         user.getName().setFirstName("John");
         user.getName().setInitial( new Character('Q') );
         user.getName().setLastName("Public");
         user.setPassword("password");
         user.setTimeOfCreation( new GregorianCalendar() );
View Full Code Here

Examples of org.jitterbit.util.name.Name

    }

    public KongaDataObject(KongaID id) {
        this.id = (id != null) ? id : ID_FACTORY.createID(this);
        try {
            nameObject = new Name(getNameValidator(this));
        } catch (IllegalNameException e) {
            // This should never happen. If it does the application is not
            // configured correctly.
            throw new RuntimeException("The application is not configured "
                            + "correctly. An attempt was made to create an instance of "
View Full Code Here

Examples of org.jooq.Name

                    .join(i).on(i.INHRELID.eq(oid(ct)))
                    .join(pt).on(i.INHPARENT.eq(oid(pt)))
                    .join(pn).on(pt.RELNAMESPACE.eq(oid(pn)))
                    .fetch()) {

                Name child = name(inheritance.value1(), inheritance.value2());
                Name parent = name(inheritance.value3(), inheritance.value4());

                if (inheritance.value5() > 1) {
                    log.info("Multiple inheritance",
                        "Multiple inheritance is not supported by jOOQ: " +
                        child +
View Full Code Here

Examples of org.jruby.ext.openssl.x509store.Name

    }

    @Override
    @JRubyMethod
    public RubyFixnum hash() {
        Name name = new Name(new org.bouncycastle.asn1.x509.X509Name(new Vector<Object>(oids),new Vector<Object>(values)));
        return getRuntime().newFixnum(name.hash());
    }
View Full Code Here

Examples of org.kitesdk.morphline.protobuf.Protos.Complex.Name

    Name.Builder nameBuilder = Complex.Name.newBuilder();
    nameBuilder.setFloatVal(5f).setIntVal(100).setLongVal(5000l);
    nameBuilder.addAllStringVal(Arrays.asList("All", "you", "need", "is", "money"));
    nameBuilder.setRepeatedLong(RepeatedLongs.newBuilder().addAllLongVal(LIST_OF_LONGS));
    Name name = nameBuilder.build();
    Link link1 = Link.newBuilder().addLanguage("CZ").addLanguage("EN-US").setUrl("http://google.com").build();
    Link link2 = Link.newBuilder().addLanguage("RU").setUrl("https://vk.com/").build();

    Complex.Builder complexBuilder = Complex.newBuilder();
    complexBuilder.setDocId(5);
    complexBuilder.setName(name);
    complexBuilder.addLink(link1);
    complexBuilder.addLink(link2);
    complexBuilder.setType(Type.UPDATE);
    complex = complexBuilder.build();

    nameBytes = name.toByteArray();
    link1Bytes = link1.toByteArray();
    link2Bytes = link2.toByteArray();
  }
View Full Code Here

Examples of org.luaj.vm2.ast.Name

      } else {
        outr("new VarArgFunction(env) {");
        addindent();
        outb("public Varargs invoke(Varargs $arg) {");
        for ( int i=0; i<m; i++ ) {
          Name name = (Name) body.parlist.names.get(i);
          String value = i>0? "$arg.arg("+(i+1)+")": "$arg.arg1()";
          singleLocalDeclareAssign( name, value );
        }
        if ( body.parlist.isvararg ) {
          Variable arg = body.scope.find("arg");
View Full Code Here

Examples of org.modeshape.jcr.value.Name

    protected MutableCachedNode createNamespace( SessionCache session,
                                                 MutableCachedNode parent,
                                                 String prefix,
                                                 String uri ) {
        Name nodeName = prefix.length() != 0 ? session.getContext().getValueFactories().getNameFactory().create(prefix) : ModeShapeLexicon.NAMESPACE;
        return createNode(session,
                          parent,
                          "mode:namespaces-" + uri,
                          nodeName,
                          ModeShapeLexicon.NAMESPACE,
View Full Code Here

Examples of org.mokai.annotation.Name

   * @return a String that is used as the name of the component.
   */
  public static String getComponentName(Object component) {
    Class<?> componentClass = component.getClass();

    Name nameAnnotation = componentClass.getAnnotation(Name.class);
    if (nameAnnotation != null) {
      return nameAnnotation.value();
    }

    return componentClass.getSimpleName();
  }
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.