Java Code Examples for com.android.dex.util.ExceptionWithContext#addContext()

The following examples show how to use com.android.dex.util.ExceptionWithContext#addContext() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LocalsArraySet.java    From Box with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public void annotate(ExceptionWithContext ex) {
    ex.addContext("(locals array set; primary)");
    primary.annotate(ex);

    int sz = secondaries.size();
    for (int label = 0; label < sz; label++) {
        LocalsArray la = secondaries.get(label);

        if (la != null) {
            ex.addContext("(locals array set: primary for caller "
                    + Hex.u2(label) + ')');

            la.getPrimary().annotate(ex);
        }
    }
}
 
Example 2
Source File: LocalsArraySet.java    From Box with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public void annotate(ExceptionWithContext ex) {
    ex.addContext("(locals array set; primary)");
    primary.annotate(ex);

    int sz = secondaries.size();
    for (int label = 0; label < sz; label++) {
        LocalsArray la = secondaries.get(label);

        if (la != null) {
            ex.addContext("(locals array set: primary for caller "
                    + Hex.u2(label) + ')');

            la.getPrimary().annotate(ex);
        }
    }
}
 
Example 3
Source File: LocalsArraySet.java    From J2ME-Loader with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public void annotate(ExceptionWithContext ex) {
    ex.addContext("(locals array set; primary)");
    primary.annotate(ex);

    int sz = secondaries.size();
    for (int label = 0; label < sz; label++) {
        LocalsArray la = secondaries.get(label);

        if (la != null) {
            ex.addContext("(locals array set: primary for caller "
                    + Hex.u2(label) + ')');

            la.getPrimary().annotate(ex);
        }
    }
}
 
Example 4
Source File: LocalsArraySet.java    From buck with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override
public void annotate(ExceptionWithContext ex) {
    ex.addContext("(locals array set; primary)");
    primary.annotate(ex);

    int sz = secondaries.size();
    for (int label = 0; label < sz; label++) {
        LocalsArray la = secondaries.get(label);

        if (la != null) {
            ex.addContext("(locals array set: primary for caller "
                    + Hex.u2(label) + ')');

            la.getPrimary().annotate(ex);
        }
    }
}
 
Example 5
Source File: OneLocalsArray.java    From Box with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public void annotate(ExceptionWithContext ex) {
    for (int i = 0; i < locals.length; i++) {
        TypeBearer type = locals[i];
        String s = (type == null) ? "<invalid>" : type.toString();
        ex.addContext("locals[" + Hex.u2(i) + "]: " + s);
    }
}
 
Example 6
Source File: ExecutionStack.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Annotates (adds context to) the given exception with information
 * about this instance.
 *
 * @param ex {@code non-null;} the exception to annotate
 */
public void annotate(ExceptionWithContext ex) {
    int limit = stackPtr - 1;

    for (int i = 0; i <= limit; i++) {
        String idx = (i == limit) ? "top0" : Hex.u2(limit - i);

        ex.addContext("stack[" + idx + "]: " +
                      stackElementString(stack[i]));
    }
}
 
Example 7
Source File: OneLocalsArray.java    From Box with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
@Override
public void annotate(ExceptionWithContext ex) {
    for (int i = 0; i < locals.length; i++) {
        TypeBearer type = locals[i];
        String s = (type == null) ? "<invalid>" : type.toString();
        ex.addContext("locals[" + Hex.u2(i) + "]: " + s);
    }
}
 
Example 8
Source File: ExecutionStack.java    From Box with Apache License 2.0 5 votes vote down vote up
/**
 * Annotates (adds context to) the given exception with information
 * about this instance.
 *
 * @param ex {@code non-null;} the exception to annotate
 */
public void annotate(ExceptionWithContext ex) {
    int limit = stackPtr - 1;

    for (int i = 0; i <= limit; i++) {
        String idx = (i == limit) ? "top0" : Hex.u2(limit - i);

        ex.addContext("stack[" + idx + "]: " +
                      stackElementString(stack[i]));
    }
}
 
Example 9
Source File: OneLocalsArray.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
   @Override
public void annotate(ExceptionWithContext ex) {
       for (int i = 0; i < locals.length; i++) {
           TypeBearer type = locals[i];
           String s = (type == null) ? "<invalid>" : type.toString();
           ex.addContext("locals[" + Hex.u2(i) + "]: " + s);
       }
   }
 
Example 10
Source File: ExecutionStack.java    From J2ME-Loader with Apache License 2.0 5 votes vote down vote up
/**
 * Annotates (adds context to) the given exception with information
 * about this instance.
 *
 * @param ex {@code non-null;} the exception to annotate
 */
public void annotate(ExceptionWithContext ex) {
    int limit = stackPtr - 1;

    for (int i = 0; i <= limit; i++) {
        String idx = (i == limit) ? "top0" : Hex.u2(limit - i);

        ex.addContext("stack[" + idx + "]: " +
                      stackElementString(stack[i]));
    }
}
 
Example 11
Source File: OneLocalsArray.java    From buck with Apache License 2.0 5 votes vote down vote up
/** {@inheritDoc} */
public void annotate(ExceptionWithContext ex) {
    for (int i = 0; i < locals.length; i++) {
        TypeBearer type = locals[i];
        String s = (type == null) ? "<invalid>" : type.toString();
        ex.addContext("locals[" + Hex.u2(i) + "]: " + s);
    }
}
 
Example 12
Source File: ExecutionStack.java    From buck with Apache License 2.0 5 votes vote down vote up
/**
 * Annotates (adds context to) the given exception with information
 * about this instance.
 *
 * @param ex {@code non-null;} the exception to annotate
 */
public void annotate(ExceptionWithContext ex) {
    int limit = stackPtr - 1;

    for (int i = 0; i <= limit; i++) {
        String idx = (i == limit) ? "top0" : Hex.u2(limit - i);

        ex.addContext("stack[" + idx + "]: " +
                      stackElementString(stack[i]));
    }
}