All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.appsingularity.postman.compiler.model.fields.SparseBooleanArrayField Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package com.appsingularity.postman.compiler.model.fields;

import android.support.annotation.NonNull;

import com.appsingularity.postman.compiler.model.CollectedField;
import com.appsingularity.postman.compiler.model.ModelUtils;
import com.appsingularity.postman.compiler.writers.CollectedFieldWriter;
import com.appsingularity.postman.compiler.writers.fields.SparseBooleanArrayFieldWriter;

import java.util.ArrayList;
import java.util.List;

import javax.lang.model.element.Element;
import javax.lang.model.util.Elements;
import javax.lang.model.util.Types;

public class SparseBooleanArrayField implements CollectedField {
    @NonNull
    private final Element mElement;
    protected static List mSupportedTypes;

    public static boolean canProcessElement(@NonNull Types types, @NonNull Elements elements, @NonNull Element element) {
        if (mSupportedTypes == null) {
            mSupportedTypes = new ArrayList<>();
            mSupportedTypes.add("android.util.SparseBooleanArray");
        }
        return (ModelUtils.isElementOfType(types, elements, element, mSupportedTypes));
    }

    public SparseBooleanArrayField(@NonNull Element element) {
        mElement = element;
    }

    @NonNull
    @Override
    public CollectedFieldWriter getWriter() {
        return new SparseBooleanArrayFieldWriter(mElement);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy