Package com.ericsson.otp.erlang

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


        new OtpErlangObject[] { new OtpErlangAtom("attributes"),
            new OtpErlangAtom(ErlangRunner.getName(file, ErlangRunner.ERL.BEAM,config.getErlangCompileIntoBeamDirectory())) },
        "Could not load attributes of " + file.getName());

    OtpErlangList listOfDepTuples = (OtpErlangList) response.elementAt(1);// the first element is 'ok'
    for (OtpErlangObject tup : listOfDepTuples.elements()) {
      OtpErlangTuple tuple = (OtpErlangTuple) tup;
      OtpErlangObject name = tuple.elementAt(0);
      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
View Full Code Here


            new OtpErlangAtom(ErlangRunner.getName(file, ErlangRunner.ERL.BEAM, config.getErlangCompileIntoBeamDirectory())) },
        "Could not load dependencies of " + file.getName());
   
    // the first element is 'ok'
    OtpErlangList listOfDepTuples = (OtpErlangList) response.elementAt(1);
    for (OtpErlangObject tup : listOfDepTuples.elements()) {
      String mod = ((OtpErlangAtom) ((OtpErlangTuple) tup).elementAt(0)).atomValue();
      if (!stdModsList.contains(mod) && !dependencies.contains(mod)) {
        dependencies.add(mod);
      }
    }
View Full Code Here

            new OtpErlangAtom(ErlangRunner.getName(new File(parent.sourceFolder, parent.getName()
                + ERL.ERL), ErlangRunner.ERL.BEAM,config.getErlangCompileIntoBeamDirectory())) },
        "Could not load exports of " + parent.getName());

    OtpErlangList listOfExportTuples = (OtpErlangList) response.elementAt(1);// the first element is 'ok'
    for (OtpErlangObject tup : listOfExportTuples.elements()) {
      String funName = ((OtpErlangAtom) ((OtpErlangTuple) tup).elementAt(0)).atomValue();
      if (!funName.equals("module_info"))
      {
        long funArity = ((OtpErlangLong) ((OtpErlangTuple) tup).elementAt(1)).longValue();
        String qualifiedName = FuncSignature.qualifiedNameFromFunction(parent.getName(), funName,funArity);
View Full Code Here

        new OtpErlangObject[] { new OtpErlangAtom("attributes"),
            new OtpErlangAtom(ErlangRunner.getName(file, ErlangRunner.ERL.BEAM,config.getErlangCompileIntoBeamDirectory())) },
        "Could not load attributes of " + file.getName());

    OtpErlangList listOfDepTuples = (OtpErlangList) response.elementAt(1);// the first element is 'ok'
    for (OtpErlangObject tup : listOfDepTuples.elements()) {
      OtpErlangTuple tuple = (OtpErlangTuple) tup;
      OtpErlangObject name = tuple.elementAt(0);
      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
View Full Code Here

    public void dump(OtpErlangObject arg, StringBuffer resultHolder) {
      OtpErlangList list = (OtpErlangList) arg;

      resultHolder.append("[");
      boolean first = true;
      for (OtpErlangObject obj : list.elements()) {
        if (!first)
          resultHolder.append(',');
        else
          first = false;
        classToDumper.get(obj.getClass()).dump(obj, resultHolder);
View Full Code Here

          new OtpErlangAtom("dependencies"),
          new OtpErlangAtom(ErlangRunner.getName(file, ERL.BEAM))},
          "Could not load dependencies of "+file.getName());

      OtpErlangList listOfDepTuples = (OtpErlangList)response.elementAt(1);// the first element is 'ok'
      for(OtpErlangObject tup:listOfDepTuples.elements())
      {
        String mod = ( (OtpErlangAtom) ((OtpErlangTuple)tup).elementAt(0)).atomValue();
            if (!stdModsList.contains(mod) && !dependencies.contains(mod)) {
                dependencies.add(mod);
            }
View Full Code Here

  {
    String outcome = null;
    try
    {
      OtpErlangList list = (OtpErlangList) obj;
      for(OtpErlangObject p:list.elements())
      {
        OtpErlangTuple pair = (OtpErlangTuple) p;
        if (pair.arity() != 2)
          throw new IllegalArgumentException("key-value pair is not a pair, got "+p);
        config.assignValue(pair.elementAt(0).toString(), ((OtpErlangAtom)pair.elementAt(1)).atomValue(), true);
View Full Code Here

    public void dump(OtpErlangObject arg, StringBuffer resultHolder) {
      OtpErlangList list = (OtpErlangList) arg;

      resultHolder.append("[");
      boolean first = true;
      for (OtpErlangObject obj : list.elements()) {
        if (!first)
          resultHolder.append(',');
        else
          first = false;
        classToDumper.get(obj.getClass()).dump(obj, resultHolder);
View Full Code Here

            new OtpErlangAtom(ErlangRunner.getName(file, ErlangRunner.ERL.BEAM)) },
        "Could not load dependencies of " + file.getName());
   
    // the first element is 'ok'
    OtpErlangList listOfDepTuples = (OtpErlangList) response.elementAt(1);
    for (OtpErlangObject tup : listOfDepTuples.elements()) {
      String mod = ((OtpErlangAtom) ((OtpErlangTuple) tup).elementAt(0)).atomValue();
      if (!stdModsList.contains(mod) && !dependencies.contains(mod)) {
        dependencies.add(mod);
      }
    }
View Full Code Here

            new OtpErlangAtom(ErlangRunner.getName(new File(parent.sourceFolder, parent.getName()
                + ERL.ERL), ErlangRunner.ERL.BEAM)) },
        "Could not load exports of " + parent.getName());

    OtpErlangList listOfExportTuples = (OtpErlangList) response.elementAt(1);// the first element is 'ok'
    for (OtpErlangObject tup : listOfExportTuples.elements()) {
      String funName = ((OtpErlangAtom) ((OtpErlangTuple) tup).elementAt(0)).atomValue();
      if (!funName.equals("module_info"))
      {
        long funArity = ((OtpErlangLong) ((OtpErlangTuple) tup).elementAt(1)).longValue();
        String qualifiedName = FuncSignature.qualifiedNameFromFunction(parent.getName(), funName,funArity);
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.