Package com.ericsson.otp.erlang

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


    for (int i = 0; i < typeInformation.arity(); ++i) {
      //System.out.print("\n" + typeInformation.elementAt(i).toString());
      OtpErlangTuple functionDescr = (OtpErlangTuple) typeInformation.elementAt(i);
      if (functionDescr.arity() > 3)
      {
        FuncSignature s = new FuncSignature(config,typeInformation.elementAt(i), null);
        sigs.put(s.getQualifiedName(), s);
      }
      else
      {// if not a function signature, it is an error message. The first two elements are function name and arity, we add this module name.
        String fullName = FuncSignature.qualifiedNameFromFunction(getName(),
View Full Code Here


       
        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();
        }
      }
     
      OtpErlangList outcome = null;
View Full Code Here

        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);
              } else if (bstring.startsWith("gen_event")) {
View Full Code Here

        {
          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);
              } else if (bstring.startsWith("gen_event")) {
                behaviour = new OTPGenEventBehaviour(mod);
              } else if (bstring.startsWith("gen_fsm")) {
View Full Code Here

                ignoredBehaviours.add(bstring);
                System.out.println("Warning: unknown behaviour "+bstring);
              }
            }
            else
              throw new IllegalArgumentException("behaviour attribute " + behList.elementAt(i)
                  + " is of the wrong type");
             
         
        } else
          throw new IllegalArgumentException("behaviour attribute " + value
View Full Code Here

      assertEquals(testArg[i], testResult[i]);
    }
    OtpErlangList received = (OtpErlangList) mboxListener.getMsg();
    assertEquals(testArg.length, received.arity());
    for (int i = 0; i < testArg.length; i++) {
      assertEquals(testArg[i], ((OtpErlangString) received.elementAt(i))
          .stringValue());
    }
  }

  /**
 
View Full Code Here

    OtpErlangList received = (OtpErlangList) mboxListener.getMsg();
    assertEquals(testArg.length, received.arity());
    for (int i = 0; i < testArg.length; i++) {
      for (int j = 0; j < testArg[i].length; j++) {
        assertEquals(testArg[i][j],
            (((OtpErlangString) ((OtpErlangList) received
                .elementAt(i)).elementAt(j)).stringValue()));
      }
    }
  }
View Full Code Here

      throws Exception {
    OtpErlangList erlangList = (OtpErlangList) object;
    Object result = Array.newInstance(forClass.getComponentType(),
        erlangList.arity());
    for (int i = 0; i < erlangList.arity(); i++) {
      Array.set(result, i, TypeHelpersProxy.toJava(erlangList
          .elementAt(i), forClass.getComponentType(),
          new Annotation[0]));
    }
    return result;
  }
View Full Code Here

      throws Exception {
    OtpErlangList erlangList = (OtpErlangList) object;
    Object result = Array.newInstance(forClass.getComponentType(),
        erlangList.arity());
    for (int i = 0; i < erlangList.arity(); i++) {
      Array.set(result, i, TypeHelpersProxy.toJava(erlangList
          .elementAt(i), forClass.getComponentType(),
          new Annotation[0]));
    }
    return result;
  }
View Full Code Here

        if (patternArity == termArity && lpattern.isProper() != lterm.isProper()) {
            return null;
        }
        Bindings rez = bindings;
        for (int i = 0; i < patternArity; i++) {
            rez = match(lpattern.elementAt(i), lterm.elementAt(i), rez);
            if (rez == null) {
                return null;
            }
        }
        if (patternArity == termArity) {
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.