// Path: tweakable-annotations/src/main/java/com/jackwink/tweakable/exceptions/FailedToBuildPreferenceScreenException.java
// public class FailedToBuildPreferenceScreenException extends RuntimeException {
//     public static final long serialVersionUID = 0L;
// 
//     public FailedToBuildPreferenceScreenException(String reason) {
//         super(reason);
//     }
// 
//     public FailedToBuildPreferenceScreenException(String reason, Throwable rootCause) {
//         super(reason, rootCause);
//     }
// }
// 
// Path: tweakable-annotations/src/main/java/com/jackwink/tweakable/types/AbstractTweakableValue.java
// public abstract class AbstractTweakableValue<T> implements TweakableValue<T> {
//     public static final String BUNDLE_KEYATTR_KEY = "key";
//     public static final String BUNDLE_TITLE_KEY = "title";
//     public static final String BUNDLE_SUMMARY_KEY = "summary";
// 
//     public static final String BUNDLE_CATEGORY_KEY = "category";
//     public static final String BUNDLE_SCREEN_KEY = "screen";
// 
//     public static final String ROOT_SCREEN_KEY = "tweakable-values-root-screen";
//     public static final String ROOT_CATEGORY_KEY = "tweakable-values-root-category";
// 
// 
//     protected String mTitle;
//     protected String mKey;
//     protected String mSummary;
//     protected String mCategory;
//     protected String mScreen;
// 
//     @Override
//     public String getKey() {
//         return mKey;
//     }
// 
//     @Override
//     public String getTitle() {
//         return mTitle == null ? "ERROR" : mTitle;
//     }
// 
//     @Override
//     public String getSummary() {
//         return mSummary;
//     }
// 
//     @Override
//     public String getCategory() {
//         return mCategory;
//     }
// 
//     @Override
//     public String getScreen() {
//         return mScreen;
//     }
// 
//     public static String getDefaultString(String value, String defaultValue) {
//         if (value == null || value.isEmpty()) {
//             return defaultValue;
//         }
//         return value;
//     }
// }


import android.content.Context;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import com.jackwink.tweakable.exceptions.FailedToBuildPreferenceScreenException;
import com.jackwink.tweakable.types.AbstractTweakableValue;
import java.util.LinkedHashMap;
import java.util.Map;
package com.jackwink.tweakable.builders;




/**
 * Builds a {@link PreferenceScreen}
 */
@SuppressWarnings({ "rawtypes" })
public class PreferenceScreenBuilder extends BasePreferenceBuilder<PreferenceScreen> {
    private static final String TAG = PreferenceScreenBuilder.class.getSimpleName();

    private PreferenceManager mPreferenceManager = null;


    public PreferenceScreenBuilder() {
        mAttributeMap = new LinkedHashMap<String, Object>();
    }

    @Override
    public Class[] getHandledTypes() {
        return new Class[0];
    }

    @Override
    public PreferenceScreenBuilder setContext(Context context) {
        mContext = context;
        return this;
    }

    @Override
    public PreferenceScreenBuilder setBundle(Map<String, Object> map) {
        mAttributeMap = map;
        return this;
    }

    public PreferenceScreenBuilder setPreferenceManager(PreferenceManager preferenceManager) {
        mPreferenceManager = preferenceManager;
        return this;
    }

    /** {@inheritDoc} */
    public PreferenceScreen build() {
        if (mContext == null) {
// Path: tweakable-annotations/src/main/java/com/jackwink/tweakable/exceptions/FailedToBuildPreferenceScreenException.java
// public class FailedToBuildPreferenceScreenException extends RuntimeException {
//     public static final long serialVersionUID = 0L;
// 
//     public FailedToBuildPreferenceScreenException(String reason) {
//         super(reason);
//     }
// 
//     public FailedToBuildPreferenceScreenException(String reason, Throwable rootCause) {
//         super(reason, rootCause);
//     }
// }
// 
// Path: tweakable-annotations/src/main/java/com/jackwink/tweakable/types/AbstractTweakableValue.java
// public abstract class AbstractTweakableValue<T> implements TweakableValue<T> {
//     public static final String BUNDLE_KEYATTR_KEY = "key";
//     public static final String BUNDLE_TITLE_KEY = "title";
//     public static final String BUNDLE_SUMMARY_KEY = "summary";
// 
//     public static final String BUNDLE_CATEGORY_KEY = "category";
//     public static final String BUNDLE_SCREEN_KEY = "screen";
// 
//     public static final String ROOT_SCREEN_KEY = "tweakable-values-root-screen";
//     public static final String ROOT_CATEGORY_KEY = "tweakable-values-root-category";
// 
// 
//     protected String mTitle;
//     protected String mKey;
//     protected String mSummary;
//     protected String mCategory;
//     protected String mScreen;
// 
//     @Override
//     public String getKey() {
//         return mKey;
//     }
// 
//     @Override
//     public String getTitle() {
//         return mTitle == null ? "ERROR" : mTitle;
//     }
// 
//     @Override
//     public String getSummary() {
//         return mSummary;
//     }
// 
//     @Override
//     public String getCategory() {
//         return mCategory;
//     }
// 
//     @Override
//     public String getScreen() {
//         return mScreen;
//     }
// 
//     public static String getDefaultString(String value, String defaultValue) {
//         if (value == null || value.isEmpty()) {
//             return defaultValue;
//         }
//         return value;
//     }
// }


// Path: tweakable/src/main/java/com/jackwink/tweakable/builders/PreferenceScreenBuilder.java
import android.content.Context;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import com.jackwink.tweakable.exceptions.FailedToBuildPreferenceScreenException;
import com.jackwink.tweakable.types.AbstractTweakableValue;
import java.util.LinkedHashMap;
import java.util.Map;

package com.jackwink.tweakable.builders;




/**
 * Builds a {@link PreferenceScreen}
 */
@SuppressWarnings({ "rawtypes" })
public class PreferenceScreenBuilder extends BasePreferenceBuilder<PreferenceScreen> {
    private static final String TAG = PreferenceScreenBuilder.class.getSimpleName();

    private PreferenceManager mPreferenceManager = null;


    public PreferenceScreenBuilder() {
        mAttributeMap = new LinkedHashMap<String, Object>();
    }

    @Override
    public Class[] getHandledTypes() {
        return new Class[0];
    }

    @Override
    public PreferenceScreenBuilder setContext(Context context) {
        mContext = context;
        return this;
    }

    @Override
    public PreferenceScreenBuilder setBundle(Map<String, Object> map) {
        mAttributeMap = map;
        return this;
    }

    public PreferenceScreenBuilder setPreferenceManager(PreferenceManager preferenceManager) {
        mPreferenceManager = preferenceManager;
        return this;
    }

    /** {@inheritDoc} */
    public PreferenceScreen build() {
        if (mContext == null) {
            throw new FailedToBuildPreferenceScreenException(