Examples of ClassType


Examples of gnu.bytecode.ClassType

    static Method printlnMethod = ClassType.make("java.io.PrintStream")
            .getDeclaredMethod("println",
                    new gnu.bytecode.Type[] { gnu.bytecode.Type.string_type });

    static byte[] gnuByteCodeHelloWorld() {
        ClassType c = new ClassType("HelloWorld");
        c.setSuper("java.lang.Object");
        c.setModifiers(Access.PUBLIC);
        c.setSourceFile("HelloWorld.java");

        Method m = c.addMethod("<init>", "()V", Access.PUBLIC);
        CodeAttr code = m.startCode();
        code.pushScope();
        code.emitPushThis();
        code.emitInvokeSpecial(objectCtor);
        code.emitReturn();
        code.popScope();

        m = c.addMethod("main", "([Ljava/lang/String;)V", Access.PUBLIC
                | Access.STATIC);
        code = m.startCode();
        code.pushScope();
        code.emitGetStatic(outField);
        code.emitPushString("Hello world!");
        code.emitInvokeVirtual(printlnMethod);
        code.emitReturn();
        code.popScope();

        return c.writeToArray();
    }
View Full Code Here

Examples of l2p.gameserver.model.base.ClassType

  private Set<PlayerClass> getAvailableSubClasses(L2Player player, boolean isNew)
  {
    final int charClassId = player.getBaseClassId();
    final Race npcRace = getVillageMasterRace();
    final ClassType npcTeachType = getVillageMasterTeachType();
    PlayerClass currClass = PlayerClass.values()[charClassId];// .valueOf(charClassName);
    /**
     * If the race of your main class is Elf or Dark Elf, you may not select
     * each class as a subclass to the other class, and you may not select
     * Overlord and Warsmith class as a subclass.
View Full Code Here

Examples of lineage2.gameserver.model.base.ClassType

    for (Iterator<Element> iterator = rootElement.elementIterator(); iterator.hasNext();)
    {
      Element element = iterator.next();
      Race race = Race.valueOf(element.attributeValue("race").toLowerCase());
      Sex sex = Sex.valueOf(element.attributeValue("sex").toUpperCase());
      ClassType classtype = ClassType.valueOf(element.attributeValue("type").toUpperCase());
      StatAttributes min_attr = null;
      StatAttributes max_attr = null;
      StatAttributes base_attr = null;
      BaseArmorDefence arm_defence = null;
      BaseJewelDefence jewl_defence = null;
View Full Code Here

Examples of net.sf.l2j.gameserver.model.base.ClassType

        int charClassId = player.getBaseClass();

        if (charClassId >= 88) charClassId = player.getClassId().getParent().ordinal();

        final PlayerRace npcRace = getVillageMasterRace();
        final ClassType npcTeachType = getVillageMasterTeachType();

        PlayerClass currClass = PlayerClass.values()[charClassId];

        /**
         * If the race of your main class is Elf or Dark Elf,
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.ClassType

    categories.addCategory("Category 1");
    categories.addCategory("Category 2");
    categories.addCategory("Category 3");
    vcard.setCategories(categories);
   
    vcard.setSecurityClass(new ClassType("Public"));
    vcard.setProdId(new ProdIdType("31e78c0d-fb07-479d-b6af-95a9a3f2916f"));
    vcard.setSortString(new SortStringType("JOHN"));
   
    vcard.setMailer(new MailerType("Mozilla Thunderbird"));
    vcard.setTitle(new TitleType("Generic Accountant"));
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.ClassType

   * @param vcard
   * @throws VCardParseException
   */
  private void parseClassType(String group, String value, List<ParameterType> paramTypeList, VCardImpl vcard) throws VCardParseException {
    try {
      ClassType classType = new ClassType();
      parseParamTypes(classType, paramTypeList, value, VCardTypeName.CLASS);
     
      if(classType.isQuotedPrintable()) {
        value = decodeQuotedPrintableValue(classType, value);
      }
     
      if(group != null) {
        classType.setGroup(group);
      }
     
      classType.setSecurityClass(VCardUtils.unescapeString(value));
      vcard.setSecurityClass(classType);
    }
    catch(Exception ex) {
      throw new VCardParseException("ClassType ("+VCardTypeName.CLASS.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
    }
View Full Code Here

Examples of net.sourceforge.cardme.vcard.types.ClassType

      assertEquals(3.4, f.getLongitude(), .01);
    }
   
    //CLASS
    {
      ClassType f = vcard.getSecurityClass();
      assertEquals("Public", f.getSecurityClass());
    }
   
    //PROFILE
    {
      ProfileType f = vcard.getProfile();
      assertEquals("VCard", f.getProfile());
    }
   
    //TZ
    {
      TzType f = vcard.getTz();
      assertEquals(1, f.getHourOffset());
      assertEquals(0, f.getMinuteOffset());
    }
   
    //LABEL
    {
      //This label does not get parsed because its parameter types
      //do not match any of the parameter types of any of the existing
      //addresses. In this case the parameter type PARCEL is extra from
      //the address.
      //
      //This is an issue with the way Labels and Addresses are defined in
      //the VCard RFC. There are 2 ways to go about it:
      //
      //1: An ADR may have only 1 LABEL associated to it, the LABEL directly under it
      //2: An ADR may have only 1 LABEL associated to it by parameter types. Only
      //   one ADR and LABEL without zero parameter types may hold an association.
      //
      // Cardme takes approach 2.
     
      /*
      List<LabelType> it = vcard.getLables();
      assertEquals(1, it.size());
     
      LabelType f = it.get(0);
      assertEquals("John Doe\nNew York, NewYork,\nSouth Crecent Drive,\nBuilding 5, floor 3,\nUSA", f.getLabel());
      List<LabelParamType> types = f.getParams();
      assertEquals(3, types.size());
      assertTrue(types.contains(LabelParamType.HOME));
      assertTrue(types.contains(LabelParamType.PARCEL));
      assertTrue(types.contains(LabelParamType.PREF));
      */
     
    }
   
    //SORT-STRING
    {
      SortStringFeature f = vcard.getSortString();
      assertEquals("JOHN", f.getSortString());
    }
   
    //ROLE
    {
      RoleFeature f = vcard.getRole();
      assertEquals("Counting Money", f.getRole());
    }
   
    //SOURCE
    {
      SourceFeature f = vcard.getSource();
      assertEquals("Whatever", f.getSource());
    }
   
    //MAILER
    {
      MailerFeature f = vcard.getMailer();
      assertEquals("Mozilla Thunderbird", f.getMailer());
    }
   
    //NAME
    {
      NameType f = vcard.getName();
      assertEquals("VCard for John Doe", f.getName());
    }
   
    //custom types
    {
      List<ExtendedType> it = vcard.getExtendedTypes();
      assertEquals(4, it.size());
     
      ExtendedType f = it.get(0);
      assertEquals("item2", f.getGroup());
      assertEquals("X-ABLABEL", f.getExtendedName());
      assertEquals("_$!<HomePage>!$_", f.getExtendedValue());

      f = it.get(1);
      assertEquals("X-ABUID", f.getExtendedName());
      assertEquals("0E7602CC-443E-4B82-B4B1-90F62F99A199:ABPerson", f.getExtendedValue());
     
      f = it.get(2);
      assertEquals("X-GENERATOR", f.getExtendedName());
      assertEquals("Cardme Generator", f.getExtendedValue());
     
      f = it.get(3);
      assertEquals("X-LONG-STRING", f.getExtendedName());
      assertEquals("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890", f.getExtendedValue());
    }
   
    VCardImpl vcard2 = (VCardImpl)vcard;
   
    if(vcard2.hasErrors()) {
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.ClassType

    {
        TypeInstance type = memberDecl.getReturnType();
   
        if ( type instanceof ClassType )
        {
            ClassType classType = ( ClassType ) type;
            String typeName = classType.getClassTypeDeclaration().getQualifiedName();
           
            if ( typeName.equals( "java.lang.String" ) )
            {
                return strValue;
            }
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.ClassType

       
        do
        {
            AnnotationInstance ann = getAnnotation( decl, unqualifiedName );
            if ( ann != null ) return ann;
            ClassType superType = decl.getSuperclass();
            TypeDeclaration superTypeDecl = getDeclaration( superType );
            decl = superTypeDecl instanceof ClassDeclaration ? ( ClassDeclaration ) superTypeDecl : null;
        } while ( decl != null );
       
        return null;
View Full Code Here

Examples of org.apache.beehive.netui.compiler.typesystem.type.ClassType

                    return method;
                }
            }
        }
       
        ClassType superclass = jclass.getSuperclass();
       
        if ( superclass != null )
        {
            return getClassMethod( getDeclaration( superclass ), methodName, desiredAnnotation, true );
        }
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.