Package com.ericsson.otp.erlang

Examples of com.ericsson.otp.erlang.OtpErlangList.arity()


    } else {
      throw new IllegalArgumentException("unknown Erlang response " + outcome);
    }
    OtpErlangList trace = (OtpErlangList) result.elementAt(2);
    ErlangLabel[] answerDetails = new ErlangLabel[trace.arity()];
    for (int i = 0; i < trace.arity(); ++i) {
      OtpErlangTuple elemAti = (OtpErlangTuple) trace.elementAt(i);
      if (elemAti.arity() < 2 || elemAti.arity() > 3)
        throw new IllegalArgumentException("received tuple " + elemAti
            + " of invalid arity");
      if (elemAti.arity() == 3) {
View Full Code Here


      if (name instanceof OtpErlangAtom && ((OtpErlangAtom) name).atomValue().equals("behaviour")) {// found the OTP behaviour attribute
        OtpErlangObject value = tuple.elementAt(1);
        if (value instanceof OtpErlangList) // list of behaviours
        {
          OtpErlangList behList = (OtpErlangList)value;
          for(int i=0;i<behList.arity();++i)
            if (behList.elementAt(i) instanceof OtpErlangAtom)
            {
              String bstring = ((OtpErlangAtom) (behList.elementAt(i))).atomValue();
              if (bstring.startsWith("gen_server")) {
                behaviour = new OTPGenServerBehaviour(mod);
View Full Code Here

    }
    progress.next();// 6

    sigTypes = new TreeMap<String,OtpErlangTuple>();
    OtpErlangList analysisResults = (OtpErlangList) response.elementAt(1);
    Assert.assertEquals(1, analysisResults.arity());
    OtpErlangTuple fileDetails = (OtpErlangTuple) analysisResults.elementAt(0);
    OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
    for (int i = 0; i < typeInformation.arity(); ++i) {
      OtpErlangTuple functionDescr = (OtpErlangTuple) typeInformation.elementAt(i);
      if (functionDescr.arity() > 3)
View Full Code Here

    sigTypes = new TreeMap<String,OtpErlangTuple>();
    OtpErlangList analysisResults = (OtpErlangList) response.elementAt(1);
    Assert.assertEquals(1, analysisResults.arity());
    OtpErlangTuple fileDetails = (OtpErlangTuple) analysisResults.elementAt(0);
    OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
    for (int i = 0; i < typeInformation.arity(); ++i) {
      OtpErlangTuple functionDescr = (OtpErlangTuple) typeInformation.elementAt(i);
      if (functionDescr.arity() > 3)
      {
        FuncSignature s = new FuncSignature(config,functionDescr, null);
        sigTypes.put(s.getQualifiedName(), functionDescr);
View Full Code Here

     */
    public static void setStateNamesToBeIgnored(LayoutOptions options, OtpErlangObject stateNamesAsObject)
    {
     
      OtpErlangList statesToBeIgnored = (OtpErlangList)stateNamesAsObject;
      if (statesToBeIgnored.arity() > 0 && options != null)
      {
        if (options.ignoredStates == null)
          options.ignoredStates = new HashSet<String>();
        for(OtpErlangObject obj:statesToBeIgnored)
          options.ignoredStates.add( ((OtpErlangAtom)obj).atomValue() );
View Full Code Here

          tail = Signature.stringToList(tail);
       
        if (tail instanceof OtpErlangList)
        {// merge this into the current list.
          OtpErlangList tailAsList = (OtpErlangList)tail;
          for(int i=0;i<tailAsList.arity();++i)
            listComponents.add(tailAsList.elementAt(i));
          tail = tailAsList.getLastTail();
        }
      }
     
View Full Code Here

      outcomeEnum = TRACEOUTCOME.TRACE_FAIL;
    } else {
      throw new IllegalArgumentException("unknown Erlang response " + outcome);
    }
    OtpErlangList trace = (OtpErlangList) result.elementAt(2);
    ErlangLabel[] answerDetails = new ErlangLabel[trace.arity()];
    for (int i = 0; i < trace.arity(); ++i) {
      OtpErlangTuple elemAti = (OtpErlangTuple) trace.elementAt(i);
      if (elemAti.arity() < 2 || elemAti.arity() > 3)
        throw new IllegalArgumentException("received tuple " + elemAti
            + " of invalid arity");
View Full Code Here

    } else {
      throw new IllegalArgumentException("unknown Erlang response " + outcome);
    }
    OtpErlangList trace = (OtpErlangList) result.elementAt(2);
    ErlangLabel[] answerDetails = new ErlangLabel[trace.arity()];
    for (int i = 0; i < trace.arity(); ++i) {
      OtpErlangTuple elemAti = (OtpErlangTuple) trace.elementAt(i);
      if (elemAti.arity() < 2 || elemAti.arity() > 3)
        throw new IllegalArgumentException("received tuple " + elemAti
            + " of invalid arity");
      if (elemAti.arity() == 3) {
View Full Code Here

            new OtpErlangList(new OtpErlangObject[]{new OtpErlangString(ErlangRunner.getName(f, ERL.ERL))}),
            new OtpErlangAtom("types")
          },
        "Could not run typer");
       OtpErlangList analysisResults = (OtpErlangList)response.elementAt(1);
        Assert.assertEquals(1,analysisResults.arity());
        OtpErlangTuple fileDetails = (OtpErlangTuple)analysisResults.elementAt(0);
        OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
        for(int i=0;i<typeInformation.arity();++i)
        {
          FuncSignature s = new FuncSignature(typeInformation.elementAt(i));
View Full Code Here

        "Could not run typer");
       OtpErlangList analysisResults = (OtpErlangList)response.elementAt(1);
        Assert.assertEquals(1,analysisResults.arity());
        OtpErlangTuple fileDetails = (OtpErlangTuple)analysisResults.elementAt(0);
        OtpErlangList typeInformation = (OtpErlangList) fileDetails.elementAt(3);
        for(int i=0;i<typeInformation.arity();++i)
        {
          FuncSignature s = new FuncSignature(typeInformation.elementAt(i));
          sigs.put(s.toString(), s);
        }
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.