Examples of ExtendedType


Examples of com.tagtraum.perf.gcviewer.model.AbstractGCEvent.ExtendedType

        }
    }

    protected ExtendedType parseType(String line, ParseInformation pos) throws ParseException {
        String typeString = parseTypeString(line, pos);
        ExtendedType gcType = extractTypeFromParsedString(typeString);
        if (gcType == null) {
            throw new UnknownGcTypeException(typeString, line, pos);
        }
       
        return gcType;
View Full Code Here

Examples of com.tagtraum.perf.gcviewer.model.AbstractGCEvent.ExtendedType

        return gcType;
    }


    protected ExtendedType extractTypeFromParsedString(String typeName) throws UnknownGcTypeException {
        ExtendedType extendedType = null;
        String lookupTypeName = typeName.endsWith("--")
                ? typeName.substring(0, typeName.length()-2)
                        : typeName;
        AbstractGCEvent.Type gcType = AbstractGCEvent.Type.lookup(lookupTypeName);
        // the gcType may be null because there was a PrintGCCause flag enabled - if so, reparse it with the first paren set stripped
View Full Code Here

Examples of com.tagtraum.perf.gcviewer.model.AbstractGCEvent.ExtendedType

                    // 0.356: [GC pause (young), 0.00219944 secs] -> GC_PAUSE pattern but GC_MEMORY_PAUSE
                    //   event (has extensive details)
                    // all other GC types are the same as in standard G1 mode.
                    gcPauseMatcher.reset(line);
                    if (gcPauseMatcher.matches()) {
                        ExtendedType type = extractTypeFromParsedString(gcPauseMatcher.group(GC_PAUSE_GROUP_TYPE));

                        if (type != null && type.getPattern().compareTo(GcPattern.GC_MEMORY_PAUSE) == 0) {
                            // detailed G1 events start with GC_MEMORY pattern, but are of type GC_MEMORY_PAUSE

                            gcEvent = new G1GcEvent();
                            Date datestamp = parseDatestamp(gcPauseMatcher.group(GC_PAUSE_GROUP_DATESTAMP), parsePosition);
                            gcEvent.setDateStamp(datestamp);
View Full Code Here

Examples of com.tagtraum.perf.gcviewer.model.AbstractGCEvent.ExtendedType

     * @throws ParseException
     */
    private void parseIncompleteConcurrentEvent(GCModel model, AbstractGCEvent<?> previousEvent, String line, ParseInformation pos) throws ParseException {
        // some concurrent event is mixed in -> extract it
        pos.setIndex(line.indexOf("GC conc"));
        ExtendedType type = parseType(line, pos);
        model.add(parseConcurrentEvent(line,
                pos,
                previousEvent != null ? previousEvent.getDatestamp() : null,
                previousEvent != null ? previousEvent.getTimestamp() : 0,
                type));
View Full Code Here

Examples of com.tagtraum.perf.gcviewer.model.AbstractGCEvent.ExtendedType

            // parse timestamp          "double:"
            // parse collection type    "[TYPE"
            // pre-used->post-used, total, time
            Date datestamp = parseDatestamp(line, pos);
            double timestamp = getTimestamp(line, pos, datestamp);
            ExtendedType type = parseType(line, pos);
            // special provision for concurrent events
            if (type.getConcurrency() == Concurrency.CONCURRENT) {
                ae = parseConcurrentEvent(line, pos, datestamp, timestamp, type);
            }
            else if (type.getCollectionType().equals(CollectionType.VM_OPERATION)) {
                ae = new VmOperationEvent();
                VmOperationEvent vmOpEvent = (VmOperationEvent) ae;
               
                vmOpEvent.setDateStamp(datestamp);
                vmOpEvent.setTimestamp(timestamp);
View Full Code Here

Examples of com.tagtraum.perf.gcviewer.model.AbstractGCEvent.ExtendedType

            // parse collection type    "[TYPE"
            // either GC data or another collection type starting with timestamp
            // pre-used->post-used, total, time
            Date datestamp = parseDatestamp(line, pos);
            double timestamp = getTimestamp(line, pos, datestamp);
            ExtendedType type = parseType(line, pos);
            // special provision for CMS events
            if (type.getConcurrency() == Concurrency.CONCURRENT) {
                ae = new ConcurrentGCEvent();
                ConcurrentGCEvent event = (ConcurrentGCEvent)ae;

                // simple concurrent events (ending with -start) just are of type GcPattern.GC
                event.setDateStamp(datestamp);
                event.setTimestamp(timestamp);
                event.setExtendedType(type);
                if (type.getPattern() == GcPattern.GC_PAUSE_DURATION) {
                    // the -end events contain a pause and duration as well
                    int start = pos.getIndex();
                    int end = line.indexOf('/', pos.getIndex());
                    event.setPause(NumberParser.parseDouble(line.substring(start, end)));
                    start = end + 1;
                    end = line.indexOf(' ', start);
                    event.setDuration(NumberParser.parseDouble(line.substring(start, end)));
                }
                // nothing more to parse...
            }
            else if (type.getCollectionType().equals(CollectionType.VM_OPERATION)) {
                ae = new VmOperationEvent();
                VmOperationEvent vmOpEvent = (VmOperationEvent) ae;
               
                vmOpEvent.setDateStamp(datestamp);
                vmOpEvent.setTimestamp(timestamp);
View Full Code Here

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

    key.setCompression(false);
    byte[] keyBytes = Util.getFileAsBytes(new File("test/images/smallTux.png"));
    key.setKey(keyBytes);
    vcard.addKey(key);
   
    ExtendedType xGenerator = new ExtendedType("X-GENERATOR", "Cardme Generator");
    xGenerator.setCharset("UTF-8");
   
    vcard.addExtendedType(xGenerator);
    vcard.addExtendedType(new ExtendedType("X-LONG-STRING", "1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890"));
   
    vcard.addImpp(new ImppType("im:alice@example.com"));
    vcard.addImpp(new ImppType(new URI("im:alice2@example.com")));
   
    ImppType impp = new ImppType();
View Full Code Here

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

   * @param vcard
   * @throws VCardParseException
   */
  private void parseXtendedType(String group, String value, String typeName, List<ParameterType> paramTypeList, VCardImpl vcard) throws VCardParseException {
    try {
      ExtendedType extendedType = new ExtendedType();
      parseParamTypes(extendedType, paramTypeList, value, VCardTypeName.XTENDED);

      if(extendedType.isQuotedPrintable()) {
        value = decodeQuotedPrintableValue(extendedType, value);
      }
     
      if(group != null) {
        extendedType.setGroup(group);
      }
     
      extendedType.setExtendedName(typeName);
      extendedType.setExtendedValue(VCardUtils.unescapeString(value));
     
      vcard.addExtendedType(extendedType);
    }
    catch(Exception ex) {
      throw new VCardParseException("ExtendedType ("+VCardTypeName.XTENDED.getType()+") ["+ex.getClass().getName()+"] "+ex.getMessage(), ex);
View Full Code Here

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

    //custom types
    {
      List<ExtendedType> it = vcard.getExtendedTypes();
      assertEquals(7, it.size());
     
      ExtendedType f = it.get(0);
      assertEquals("X-COUCHDB-APPLICATION-ANNOTATIONS", f.getExtendedName());
      assertEquals("{\"Evolution\":{\"revision\":\"2012-03-05T13:32:54Z\"}}", f.getExtendedValue());
     
      f = it.get(1);
      assertEquals("X-AIM", f.getExtendedName());
      assertEquals("johnny5@aol.com", f.getExtendedValue());
     
      List<ExtendedParamType> xParamTypes = f.getExtendedParams();
      assertEquals(2, xParamTypes.size());
     
      ExtendedParamType xParamType = xParamTypes.get(0);
      assertEquals("TYPE", xParamType.getTypeName());
      assertEquals("HOME", xParamType.getTypeValue());
     
      xParamType = xParamTypes.get(1);
      assertEquals("X-COUCHDB-UUID",xParamType.getTypeName());
      assertEquals("cb9e11fc-bb97-4222-9cd8-99820c1de454".toUpperCase(), xParamType.getTypeValue());
     
      f = it.get(2);
      assertEquals("X-EVOLUTION-FILE-AS", f.getExtendedName());
      assertEquals("Doe, John", f.getExtendedValue());
     
      f = it.get(3);
      assertEquals("X-EVOLUTION-SPOUSE", f.getExtendedName());
      assertEquals("Maria", f.getExtendedValue());

      f = it.get(4);
      assertEquals("X-EVOLUTION-MANAGER", f.getExtendedName());
      assertEquals("Big Blue", f.getExtendedValue());
     
      f = it.get(5);
      assertEquals("X-EVOLUTION-ASSISTANT", f.getExtendedName());
      assertEquals("Little Red", f.getExtendedValue());
     
      f = it.get(6);
      assertEquals("X-EVOLUTION-ANNIVERSARY", f.getExtendedName());
      assertEquals("1980-03-22", f.getExtendedValue());
    }
   
    VCardImpl vcard2 = (VCardImpl)vcard;
   
    if(vcard2.hasErrors()) {
View Full Code Here

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

    //custom types
    {
      List<ExtendedType> it = vcard.getExtendedTypes();
      assertEquals(6, it.size());
     
      ExtendedType f = it.get(0);
      assertEquals("X-PHONETIC-FIRST-NAME", f.getExtendedName());
      assertEquals("Jon", f.getExtendedValue());
     
      f = it.get(1);
      assertEquals("X-PHONETIC-LAST-NAME", f.getExtendedName());
      assertEquals("Dow", f.getExtendedValue());

      f = it.get(2);
      assertEquals("item1", f.getGroup());
      assertEquals("X-ABDATE", f.getExtendedName());
      assertEquals("1975-03-01", f.getExtendedValue());
     
      f = it.get(3);
      assertEquals("item1", f.getGroup());
      assertEquals("X-ABLABEL", f.getExtendedName());
      assertEquals("_$!<Anniversary>!$_", f.getExtendedValue());

      f = it.get(4);
      assertEquals("item2", f.getGroup());
      assertEquals("X-ABRELATEDNAMES", f.getExtendedName());
      assertEquals("Jenny", f.getExtendedValue());
     
      f = it.get(5);
      assertEquals("item2", f.getGroup());
      assertEquals("X-ABLABEL", f.getExtendedName());
      assertEquals("_$!<Spouse>!$_", f.getExtendedValue());
    }
   
    VCardImpl vcard2 = (VCardImpl)vcard;
   
    if(vcard2.hasErrors()) {
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.