Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangString


  public BeamFileData load(File file) throws IOException {

    sendGEN(conn, "beam_loader", new OtpErlangTuple(
        new OtpErlangObject[] {
              new OtpErlangAtom("disasm"),
              new OtpErlangString(file.getAbsolutePath()) }));

    try {
      OtpErlangObject reply = conn.receiveRPC();

      return new SymbolicBeamFileData(check((ETuple)OtpConverter.convert(reply), file));
View Full Code Here


            try {

                final IOtpRpc backend = getBackend();
                final OtpErlangTuple tuple = (OtpErlangTuple) backend.call(
                        Constants.ERLANG_HELPER_MODULE, Constants.FUN_STR2MS, "s",
                        new OtpErlangString(newText));
                if (((OtpErlangAtom) tuple.elementAt(0)).atomValue().equals("ok")) {
                    // correct match spec - update
                    ((MatchSpec) getValue()).setFunctionString(newText);
                    ((MatchSpec) getValue()).setMsObject(tuple.elementAt(1));
                    return null;
View Full Code Here

                        loadingFileInfo = true;
                        handler = new TraceEventHandler(tracerBackend.getName());
                        getBackend(true);
                        tracerBackend.getNodeProxy().registerEventListener(handler);
                        tracerBackend.getOtpRpc().call(Constants.ERLANG_HELPER_MODULE,
                                FUN_FILE_INFO, "s", new OtpErlangString(path));
                    } catch (final RpcException e) {
                        ErlLogger.error(e);
                        errorObject = e;
                        finishLoading(TracingStatus.EXCEPTION_THROWN);
                    }
View Full Code Here

                        tracerBackend.getNodeProxy().registerEventListener(handler);
                        final OtpErlangLong start = new OtpErlangLong(theStartIndex);
                        final OtpErlangLong stop = new OtpErlangLong(endIndex);
                        tracerBackend.getOtpRpc().call(Constants.ERLANG_HELPER_MODULE,
                                FUN_LOAD, "sii",
                                new OtpErlangString(activeResultSet.getFileName()),
                                start, stop);
                    } catch (final RpcException e) {
                        ErlLogger.error(e);
                        errorObject = e;
                        finishLoading(TracingStatus.EXCEPTION_THROWN);
View Full Code Here

        final List<OtpErlangObject> objects = Lists.newArrayList();
        final String[] names = pvm.getPathVariableNames();
        for (final String name : names) {
            final String value = URIUtil.toPath(pvm.getURIValue(name)).toPortableString();
            objects.add(new OtpErlangTuple(new OtpErlangObject[] {
                    new OtpErlangString(name), new OtpErlangString(value) }));
        }

        fCachedPathVars = OtpErlang.mkList(objects);
        // }
        return fCachedPathVars;
View Full Code Here

    }

    @Test
    public void testMatch_1() throws Exception {
        final Bindings r = OtpErlang.match("[W, V]", "[\"a\", {[1, 2]}]");
        Assert.assertEquals(r.get("W"), new OtpErlangString("a"));
        Assert.assertEquals(r.get("V"), OtpErlang.parse("{[1, 2]}"));
    }
View Full Code Here

        Assert.assertEquals(r.getName(), "_");
    }

    @Test
    public void string_1() throws TermParserException {
        final OtpErlangString r = (OtpErlangString) termParser.parse("\"Hello\"");
        Assert.assertEquals(r.stringValue(), "Hello");
    }
View Full Code Here

        Assert.assertEquals(r.stringValue(), "Hello");
    }

    @Test
    public void string_2() throws TermParserException {
        final OtpErlangString r = (OtpErlangString) termParser.parse("\"Hello world!\"");
        Assert.assertEquals(r.stringValue(), "Hello world!");
    }
View Full Code Here

        return result;
    }

    public Map<String, OtpErlangObject> getOptions() {
        final HashMap<String, OtpErlangObject> result = new HashMap<String, OtpErlangObject>();
        result.put("dir", new OtpErlangString(destination.getText()));
        // result.put("preprocess", new OtpErlangBoolean(false));
        return result;
    }
View Full Code Here

    }

    @Test
    public void cvtListOk_1() throws SignatureException {
        test(new String[] { "a" }, "ls", new OtpErlangList(
                new OtpErlangObject[] { new OtpErlangString("a") }));
    }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangString

Copyright © 2018 www.massapicom. 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.