Search in sources :

Example 1 with AttSourceDebugExtension

use of com.android.dx.cf.attrib.AttSourceDebugExtension in project J2ME-Loader by nikita36078.

the class StdAttributeFactory method sourceDebugExtension.

/**
 * Parses a {@code SourceDebugExtesion} attribute.
 */
private Attribute sourceDebugExtension(DirectClassFile cf, int offset, int length, ParseObserver observer) {
    ByteArray bytes = cf.getBytes().slice(offset, offset + length);
    CstString smapString = new CstString(bytes);
    Attribute result = new AttSourceDebugExtension(smapString);
    if (observer != null) {
        String decoded = smapString.getString();
        observer.parsed(bytes, offset, length, "sourceDebugExtension: " + decoded);
    }
    return result;
}
Also used : Attribute(com.android.dx.cf.iface.Attribute) CstString(com.android.dx.rop.cst.CstString) ByteArray(com.android.dx.util.ByteArray) AttSourceDebugExtension(com.android.dx.cf.attrib.AttSourceDebugExtension) CstString(com.android.dx.rop.cst.CstString)

Aggregations

AttSourceDebugExtension (com.android.dx.cf.attrib.AttSourceDebugExtension)1 Attribute (com.android.dx.cf.iface.Attribute)1 CstString (com.android.dx.rop.cst.CstString)1 ByteArray (com.android.dx.util.ByteArray)1