Examples of StringReference


Examples of com.sun.jdi.StringReference

        ReferenceType refType = (ReferenceType) debugHandlerClass;
        Method m = (Method) refType.methodsByName( "registerBreakpoint" ).iterator().next();
        List args = new ArrayList();
        IntegerValue lineVal = getVM().mirrorOf( line );
        StringReference nameVal = getVM().mirrorOf( sourceName );
        JDIObjectValue val = (JDIObjectValue) newValue( sourceName );
        ObjectReference realVal = val.getUnderlyingObject();
        args.add( nameVal );
        args.add( lineVal );
View Full Code Here

Examples of com.sun.jdi.StringReference

        ReferenceType refType = (ReferenceType) debugHandlerClass;
        Method m = (Method) refType.methodsByName( "removeBreakpoint" ).iterator().next();
        List args = new ArrayList();
        IntegerValue lineVal = getVM().mirrorOf( line );
        StringReference nameVal = getVM().mirrorOf( sourceName );
        JDIObjectValue val = (JDIObjectValue) newValue( sourceName );
        ObjectReference realVal = val.getUnderlyingObject();
        args.add( nameVal );
        args.add( lineVal );
View Full Code Here

Examples of com.sun.jdi.StringReference

            try {
                Object rem = getRemoteVar( "sourceName" );
                if ( rem == null ) {
                    return null;
                }
                StringReference res = (StringReference) rem;
                String realres = res.value();
                ctxCache.setCacheMVELName( realres );
                return realres;
            } catch ( NullPointerException e ) {
                // Drools 5
            } catch ( Throwable e ) {
                DroolsEclipsePlugin.log( e );
            }

            // Drools 5
            try {
                Object rem = getRemoteVar( "label" );
                if ( rem == null ) {
                    return null;
                }
                ObjectReference obj = (ObjectReference) rem;
                ClassType frameType = (ClassType) obj.type();
                Field field = frameType.fieldByName( "sourceFile" );
                rem = obj.getValue( field );
                if ( rem == null ) {
                    return null;
                }
                StringReference res = (StringReference) rem;
                String realres = res.value();
                ctxCache.setCacheMVELName( realres );
                return realres;
            } catch ( Throwable e ) {
                DroolsEclipsePlugin.log( e );
            }
View Full Code Here

Examples of com.sun.jdi.StringReference

      JdwpReplyPacket replyPacket = requestVM(
          JdwpCommandPacket.VM_CREATE_STRING, outBytes);
      defaultReplyErrorHandler(replyPacket.errorCode());

      DataInputStream replyData = replyPacket.dataInStream();
      StringReference result = StringReferenceImpl.read(this, replyData);
      return result;
    } catch (IOException e) {
      defaultIOExceptionHandler(e);
      return null;
    } finally {
View Full Code Here

Examples of com.volantis.mcs.wbsax.StringReference

                } catch (WBSAXException e) {
                    e.printStackTrace();
                    fail("Unable to get string from WBSAXString");
                }
              } else if (p1 instanceof StringReference) {
                  StringReference r1 = (StringReference) p1;
                  TestStringReference r2 = (TestStringReference) p2;
                  if (r1.resolveLogicalIndex() != r2.getLogicalOffset() ||
                          r1.resolvePhysicalIndex().getInteger() != r2.getPhysicalOffset() ||
                          !r1.resolveString().getString().equals(r2.getContents())) {
                      return
                          "Parameter " + i + " does not match (Got " + p1 + ", expected " + p2 + ")";
                  }
              } else {
                  if(!(p1.equals(p2))) {
View Full Code Here

Examples of com.volantis.mcs.wbsax.StringReference

        assertEquals("Wrong url prefix",
                     new WBSAXString(codec, "http://www.my.com/page.jsp"),
                     (WBSAXString)events.next());
       
        // Check jsessionid
        StringReference stringReference1 = (StringReference)events.next();       
        assertEquals("Wrong url jsessionid",
                     new WBSAXString(codec, ";jsessionid=123"),
                     stringReference1.resolveString());
       
        // Check suffix
        assertEquals("Wrong url suffix",
                     new WBSAXString(codec, "?parm=value#ref"),
                     (WBSAXString)events.next());
       
        // Check title
        aStartCode = (AttributeStartCode)events.next();
        assertEquals("Wrong AttributeStartCode integer", 0x36,
                     aStartCode.getInteger());
        assertEquals("Wrong AttributeStartCode name", "title",
                     aStartCode.getName());
        assertNull("Wrong AttributeStartCode value prefix",
                   aStartCode.getValuePrefix());
       
        // Check title's value       
        assertEquals("Wrong title",
                     new WBSAXString(codec, "my title"),
                     (WBSAXString)events.next());
       
        // Check href
        aStartCode = (AttributeStartCode)events.next();
        assertEquals("Wrong AttributeStartCode integer", 0x4A,
                     aStartCode.getInteger());
        assertEquals("Wrong AttributeStartCode name", "href",
                     aStartCode.getName());
        assertNull("Wrong AttributeStartCode value prefix",
                   aStartCode.getValuePrefix());
       
        // Check prefix
        assertEquals("Wrong url prefix",
                     new WBSAXString(codec, "http://www.my.com/page2.jsp"),
                     (WBSAXString)events.next());
       
        // Check jsessionid, can now check logical and physical refs to ensure
        // jsession id was added only once to string table
        StringReference stringReference2 = (StringReference)events.next();       
        assertEquals("Wrong logical ref",
                     stringReference1.resolveLogicalIndex(),
                     stringReference2.resolveLogicalIndex());
        assertEquals("Wrong physical ref",
                     stringReference1.resolvePhysicalIndex(),
                     stringReference2.resolvePhysicalIndex());
        assertEquals("Wrong url jsessionid",
                     new WBSAXString(codec, ";jsessionid=123"),
                     stringReference2.resolveString());
       
        // Check suffix
        assertEquals("Wrong url suffix",
                     new WBSAXString(codec, "?parm=value#ref2"),
                events.next());
View Full Code Here

Examples of com.volantis.mcs.wbsax.StringReference

            boolean bufferBefore) throws WBSAXException {
        String xValue = "X";
        String yValue = "Y";
        String volantisValue = "volantis.com/next";
       
        StringReference xRef = null;
        StringReference yRef = null;
        StringReference volantisRef = null;
       
        if (bufferBefore) {
            // These must be created in same order as below.
            volantisRef = references.createReference(volantisValue);
            xRef = references.createReference(xValue);
View Full Code Here

Examples of com.volantis.mcs.wbsax.StringReference

    public void fireEvents(WBSAXContentHandler handler,
            boolean bufferBefore) throws WBSAXException {
        String xValue = "X";
        String yValue = "Y";
       
        StringReference xRef = null;
        StringReference yRef = null;
       
        if (bufferBefore) {
            xRef = references.createReference(xValue);
            yRef = references.createReference(yValue);
            stringTable.markComplete();
View Full Code Here

Examples of com.volantis.mcs.wbsax.StringReference

        // returns the shard link url obtained from the shard link details.
        return new ShardLinkOpaqueValue();
    }

    public int addStringTableEntry(String string) throws SAXException {
        StringReference reference = references.createReference(string);
        return reference.resolveLogicalIndex();
    }
View Full Code Here

Examples of com.volantis.mcs.wbsax.StringReference

    // Inherit Javadoc.
    public void fireEvents(WBSAXContentHandler handler,
            boolean bufferBefore) throws WBSAXException {
        char[] abcValue = "abc".toCharArray();
       
        StringReference abcRef = null;
       
        if (bufferBefore) {
            abcRef = references.createReference(abcValue);
            stringTable.markComplete();
        }
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.