/*
 * Decompiled with CFR 0_110.
 * 
 * Could not load the following classes:
 *  android.util.Log
 *  java.io.PrintStream
 *  java.lang.Integer
 *  java.lang.NumberFormatException
 *  java.lang.Object
 *  java.lang.String
 *  java.lang.System
 *  java.lang.Throwable
 */
package com.google.code.microlog4android.format.command;

import android.util.Log;
import com.google.code.microlog4android.Level;
import com.google.code.microlog4android.format.command.FormatCommandInterface;
import com.google.code.microlog4android.format.command.util.StringUtil;
import java.io.PrintStream;

public class CategoryFormatCommand
implements FormatCommandInterface {
    public static final int DEFAULT_PRECISION_SPECIFIER = 1;
    public static final int FULL_CLASS_NAME_SPECIFIER = -1;
    private static final String TAG = "Microlog.CategoryFormatCommand";
    private int precisionSpecifier = 1;

    /*
     * Enabled force condition propagation
     * Lifted jumps to return sites
     */
    @Override
    public String execute(String string2, String string3, long l, Level level, Object object, Throwable throwable) {
        String string4 = "";
        if (string3 == null) return string4;
        if (this.precisionSpecifier != -1) return StringUtil.extractPartialClassName(string3, this.precisionSpecifier);
        return string3;
    }

    public int getPrecisionSpecifier() {
        return this.precisionSpecifier;
    }

    @Override
    public void init(String string2) {
        try {
            this.precisionSpecifier = Integer.parseInt((String)string2);
            System.out.println("Precision specifier for %c is " + this.precisionSpecifier);
            return;
        }
        catch (NumberFormatException var2_2) {
            Log.e((String)"Microlog.CategoryFormatCommand", (String)("Failed to parse the specifier for the %c pattern " + (Object)var2_2));
            return;
        }
    }

    public void setPrecisionSpecifier(int n) {
        this.precisionSpecifier = n;
    }
}

