Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangObject$Hash


    @Test
    public void sublist_3() throws TermParserException {
        final OtpErlangList r = (OtpErlangList) termParser.parse("[1,2,3|4]");
        final OtpErlangList s = (OtpErlangList) termParser.parse("[3|4]");
        final OtpErlangObject ss = r.getNthTail(2);
        Assert.assertEquals(s, ss);
    }
View Full Code Here


    }

    @Test
    public void sublist_4a() throws TermParserException {
        final OtpErlangList r = (OtpErlangList) termParser.parse("[1,2,3,4]");
        final OtpErlangObject ss = r.getNthTail(0);
        Assert.assertEquals(r, ss);
    }
View Full Code Here

    }

    @Test
    public void sublist_4b() throws TermParserException {
        final OtpErlangList r = (OtpErlangList) termParser.parse("[1,2,3,4]");
        final OtpErlangObject ss = r.getNthTail(4);
        Assert.assertEquals(new OtpErlangList(), ss);
    }
View Full Code Here

    }

    @Test
    public void sublist_4c() throws TermParserException {
        final OtpErlangList r = (OtpErlangList) termParser.parse("[1,2,3,4]");
        final OtpErlangObject ss = r.getNthTail(5);
        Assert.assertEquals(null, ss);
    }
View Full Code Here

    }

    @Test
    public void sublist_4d() throws TermParserException {
        final OtpErlangList r = (OtpErlangList) termParser.parse("[1,2,3|4]");
        final OtpErlangObject s = termParser.parse("4");
        final OtpErlangObject ss = r.getNthTail(3);
        Assert.assertEquals(s, ss);
    }
View Full Code Here

    }

    @Test
    public void sublist_5() throws TermParserException, IOException {
        final OtpErlangList r = (OtpErlangList) termParser.parse("[1,2,3,4]");
        final OtpErlangObject ss = r.getNthTail(2);
        final OtpOutputStream out = new OtpOutputStream();
        ss.encode(out);
        final byte[] contents1 = out.toByteArray();
        out.reset();
        final OtpErlangList s = (OtpErlangList) termParser.parse("[3,4]");
        s.encode(out);
        final byte[] contents2 = out.toByteArray();
View Full Code Here

    }

    @Test
    public void sublist_6() throws TermParserException, IOException {
        final OtpErlangList r = (OtpErlangList) termParser.parse("[1,2,3|4]");
        final OtpErlangObject ss = r.getNthTail(2);
        final OtpOutputStream out = new OtpOutputStream();
        ss.encode(out);
        final byte[] contents1 = out.toByteArray();
        out.reset();
        final OtpErlangList s = (OtpErlangList) termParser.parse("[3|4]");
        s.encode(out);
        final byte[] contents2 = out.toByteArray();
View Full Code Here

        }
        final List<OtpErlangObject> result = new ArrayList<OtpErlangObject>(
                imports.size());
        for (final IErlImport i : imports) {
            final Collection<ErlangFunction> functions = i.getFunctions();
            final OtpErlangObject funsT[] = new OtpErlangObject[functions.size()];
            int j = 0;
            for (final ErlangFunction f : functions) {
                funsT[j] = f.getNameArityTuple();
                j++;
            }
View Full Code Here

        final IPath beamPath = project.getProperties().getOutputDir()
                .append(module.getModuleName()).addFileExtension("beam");
        final IFile beam = project.getWorkspaceProject().getFile(beamPath);

        try {
            final OtpErlangObject info = backend.call("erlide_backend",
                    "get_module_info", "s", beam.getLocation().toPortableString());
            return (String) TypeConverter.erlang2java(info, String.class);
        } catch (final Exception e) {
            ErlLogger.warn(e);
        }
View Full Code Here

    OtpErlangObject[] _elements = source.elements();
    this.items = ((List<OtpErlangObject>)Conversions.doWrapArray(_elements));
  }
 
  public String getKind() {
    OtpErlangObject _head = IterableExtensions.<OtpErlangObject>head(this.items);
    return ((OtpErlangAtom) _head).atomValue();
  }
View Full Code Here

TOP

Related Classes of com.ericsson.otp.erlang.OtpErlangObject$Hash

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.