com.android.dx.dex.file.EncodedMethod Java Examples

The following examples show how to use com.android.dx.dex.file.EncodedMethod. 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: DexMaker.java    From lua-for-android with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
EncodedMethod toEncodedMethod(DexOptions dexOptions) {
    if (code != null) {
        RopMethod ropMethod = new RopMethod(code.toBasicBlocks(), 0);
        LocalVariableInfo locals = null;
        DalvCode dalvCode = RopTranslator.translate(
                ropMethod, PositionList.NONE, locals, code.paramSize(), dexOptions);
        return new EncodedMethod(method.constant, flags, dalvCode, StdTypeList.EMPTY);
    } else return new EncodedMethod(method.constant, flags, null, StdTypeList.EMPTY);

}
 
Example #2
Source File: DexMaker.java    From dexmaker with Apache License 2.0 5 votes vote down vote up
EncodedMethod toEncodedMethod(DexOptions dexOptions) {
    if((flags & ABSTRACT) != 0 || (flags & NATIVE) != 0){
        return new EncodedMethod(method.constant, flags, null, StdTypeList.EMPTY);
    }

    RopMethod ropMethod = new RopMethod(code.toBasicBlocks(), 0);
    LocalVariableInfo locals = null;
    DalvCode dalvCode = RopTranslator.translate(
            ropMethod, PositionList.NONE, locals, code.paramSize(), dexOptions);
    return new EncodedMethod(method.constant, flags, dalvCode, StdTypeList.EMPTY);
}