Package com.ericsson.otp.erlang

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


        if (value instanceof OtpErlangTuple) {
            final OtpErlangTuple t = (OtpErlangTuple) value;
            return t.arity();
        } else if (value instanceof OtpErlangList) {
            final OtpErlangList l = (OtpErlangList) value;
            return l.arity();
        } else if (value instanceof OtpErlangBinary) {
            final OtpErlangBinary bs = (OtpErlangBinary) value;
            return bs.size();
        } else if (list != null) {
            return list.arity();
View Full Code Here


        final OtpErlangTuple restuple = (OtpErlangTuple) obj;
        final OtpErlangAtom resindicator = (OtpErlangAtom) restuple.elementAt(0);
        if (resindicator.atomValue().equals("ok")) {
            final OtpErlangList erlangFunctionList = (OtpErlangList) restuple
                    .elementAt(1);
            for (int i = 0; i < erlangFunctionList.arity(); ++i) {
                final OtpErlangTuple fTuple = (OtpErlangTuple) erlangFunctionList
                        .elementAt(i);
                IErlFunctionClause f;
                try {
                    f = extractFunction(fTuple);
View Full Code Here

            prefix = prefixA.toString();
            if (prefix.endsWith("'")) {
                prefix = prefix.substring(0, prefix.length() - 1);
            }
        }
        fields = new ArrayList<String>(fieldL.arity());
        for (final OtpErlangObject object : fieldL) {
            final OtpErlangAtom f = (OtpErlangAtom) object;
            getFields().add(f.atomValue());
        }
    }
View Full Code Here

    }

    private void addNodesAsDebugTargets(final ILaunch aLaunch) {
        final OtpErlangList nodes = ErlideDebug.nodes(backend.getOtpRpc());
        if (nodes != null) {
            for (int i = 1, n = nodes.arity(); i < n; ++i) {
                final OtpErlangAtom a = (OtpErlangAtom) nodes.elementAt(i);
                final IDebugTarget edn = new ErlangDebugNode(this, a.atomValue());
                aLaunch.addDebugTarget(edn);
            }
        }
View Full Code Here

                    arity = l.intValue();
                } catch (final OtpErlangRangeException e) {
                }
            } else if (parameters instanceof OtpErlangList) {
                final OtpErlangList l = (OtpErlangList) parameters;
                arity = l.arity();
            }
        }
        name = a.atomValue();
    }
View Full Code Here

            if (res.isOk()) {
                final OtpErlangObject resobj = res.getValue();
                if (!resobj.equals(new OtpErlangList())) {
                    final OtpErlangList reslist = (OtpErlangList) resobj;
                    for (int i = 0; i < reslist.arity(); ++i) {
                        final OtpErlangTuple restuple = (OtpErlangTuple) reslist
                                .elementAt(i);
                        final String formattedString = formatWarningString(OtpErlang
                                .asString(restuple.elementAt(1)));
                        WarningViewManager.addWarningMessage(formattedString);
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 TreeSet<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

          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

      }
      catch(Exception ex)
      {
        Helper.throwUnchecked("Failed to parse the structure returned from statechum-typer", ex);
      }
    if (attributes.arity() != 0) throw new IllegalArgumentException("FuncSignature does not accept attributes");
    lineNumber=extractedLineNumber;moduleName=extractedModuleName;funcName=extractedFuncName;

    if (otpConverter == null)
    {
      arity = ArgList.arity();assert arity == knownArity;
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.