Package com.ericsson.otp.erlang

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


                // incorrect match spec
                final OtpErlangAtom errorType = (OtpErlangAtom) tuple.elementAt(1);
                if (errorType.atomValue().equals("standard_info")) {
                    final OtpErlangTuple errorTuple = (OtpErlangTuple) tuple.elementAt(2);
                    final StringBuilder builder = new StringBuilder("Line ");
                    builder.append(errorTuple.elementAt(0)).append(": ");
                    final OtpErlangList errorList = (OtpErlangList) errorTuple
                            .elementAt(2);
                    builder.append(((OtpErlangString) errorList.elementAt(0))
                            .stringValue());
                    if (errorList.elementAt(1) instanceof OtpErlangString) {
View Full Code Here


                final OtpErlangAtom errorType = (OtpErlangAtom) tuple.elementAt(1);
                if (errorType.atomValue().equals("standard_info")) {
                    final OtpErlangTuple errorTuple = (OtpErlangTuple) tuple.elementAt(2);
                    final StringBuilder builder = new StringBuilder("Line ");
                    builder.append(errorTuple.elementAt(0)).append(": ");
                    final OtpErlangList errorList = (OtpErlangList) errorTuple
                            .elementAt(2);
                    builder.append(((OtpErlangString) errorList.elementAt(0))
                            .stringValue());
                    if (errorList.elementAt(1) instanceof OtpErlangString) {
                        builder.append(((OtpErlangString) errorList.elementAt(1))
View Full Code Here

     *         message
     */
    public OtpErlangObject getErrorReson(final OtpErlangObject message) {
        if (message instanceof OtpErlangTuple) {
            final OtpErlangTuple tuple = (OtpErlangTuple) message;
            if (tuple.elementAt(0) instanceof OtpErlangAtom) {
                final OtpErlangAtom atom = (OtpErlangAtom) tuple.elementAt(0);
                if (atom.atomValue().equals(ATOM_ERROR_LOADING)) {
                    return tuple.elementAt(1);
                }
            }
View Full Code Here

     */
    public OtpErlangObject getErrorReson(final OtpErlangObject message) {
        if (message instanceof OtpErlangTuple) {
            final OtpErlangTuple tuple = (OtpErlangTuple) message;
            if (tuple.elementAt(0) instanceof OtpErlangAtom) {
                final OtpErlangAtom atom = (OtpErlangAtom) tuple.elementAt(0);
                if (atom.atomValue().equals(ATOM_ERROR_LOADING)) {
                    return tuple.elementAt(1);
                }
            }
        }
View Full Code Here

        if (message instanceof OtpErlangTuple) {
            final OtpErlangTuple tuple = (OtpErlangTuple) message;
            if (tuple.elementAt(0) instanceof OtpErlangAtom) {
                final OtpErlangAtom atom = (OtpErlangAtom) tuple.elementAt(0);
                if (atom.atomValue().equals(ATOM_ERROR_LOADING)) {
                    return tuple.elementAt(1);
                }
            }
        }
        return null;
    }
View Full Code Here

    public ITreeNode getData(final OtpErlangObject otpErlangObject) {
        try {
            if (otpErlangObject instanceof OtpErlangTuple) {
                final OtpErlangTuple tuple = (OtpErlangTuple) otpErlangObject;

                final String atomValue = ((OtpErlangAtom) tuple.elementAt(0)).atomValue();
                if (atomValue.equals(ATOM_TRACE_TS)) {
                    // trace data: {trace_ts, Data}

                    final OtpErlangAtom traceType = (OtpErlangAtom) tuple
                            .elementAt(INDEX_TRACE_TYPE);
View Full Code Here

                final String atomValue = ((OtpErlangAtom) tuple.elementAt(0)).atomValue();
                if (atomValue.equals(ATOM_TRACE_TS)) {
                    // trace data: {trace_ts, Data}

                    final OtpErlangAtom traceType = (OtpErlangAtom) tuple
                            .elementAt(INDEX_TRACE_TYPE);
                    lastTraceDate = readDateTuple((OtpErlangTuple) tuple.elementAt(tuple
                            .arity() - 1));

                    switch (TraceType.valueOf(traceType.atomValue().toUpperCase())) {
View Full Code Here

                if (atomValue.equals(ATOM_TRACE_TS)) {
                    // trace data: {trace_ts, Data}

                    final OtpErlangAtom traceType = (OtpErlangAtom) tuple
                            .elementAt(INDEX_TRACE_TYPE);
                    lastTraceDate = readDateTuple((OtpErlangTuple) tuple.elementAt(tuple
                            .arity() - 1));

                    switch (TraceType.valueOf(traceType.atomValue().toUpperCase())) {
                    case CALL:
                        return processCallTrace("Call", tuple);
View Full Code Here

        final OtpErlangTuple timeTuple = (OtpErlangTuple) tuple.elementAt(1);

        final int year = ((OtpErlangLong) dateTuple.elementAt(0)).intValue();
        final int month = ((OtpErlangLong) dateTuple.elementAt(1)).intValue() - 1;
        final int day = ((OtpErlangLong) dateTuple.elementAt(2)).intValue();
        final int hour = ((OtpErlangLong) timeTuple.elementAt(0)).intValue();
        final int minute = ((OtpErlangLong) timeTuple.elementAt(1)).intValue();
        final int second = ((OtpErlangLong) timeTuple.elementAt(2)).intValue();

        final Calendar calendar = Calendar.getInstance();
        calendar.set(year, month, day, hour, minute, second);
View Full Code Here

        final int year = ((OtpErlangLong) dateTuple.elementAt(0)).intValue();
        final int month = ((OtpErlangLong) dateTuple.elementAt(1)).intValue() - 1;
        final int day = ((OtpErlangLong) dateTuple.elementAt(2)).intValue();
        final int hour = ((OtpErlangLong) timeTuple.elementAt(0)).intValue();
        final int minute = ((OtpErlangLong) timeTuple.elementAt(1)).intValue();
        final int second = ((OtpErlangLong) timeTuple.elementAt(2)).intValue();

        final Calendar calendar = Calendar.getInstance();
        calendar.set(year, month, day, hour, minute, second);
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.