/** * A Generic class which has known types. * <p> * Created by anirudh.r on 30/11/16. */ @UseStag public class GenericClass<T> { public T name; public Map<String, Map<String, T>> mapField; public HashMap<Integer, T> mapIntegerField; public ArrayList<T> arrayIntegerField; }
@UseStag public class ClassWithArrayTypes { public List<String> stringList; public Collection<Integer> integerCollection; public ArrayList<Long> longArrayList; }
/** * Model class which uses FIELD_OPTION_ALL explicitly */ @UseStag(FieldOption.ALL) public class FieldOptionAllExample { public int simpleInt; public float simpleFloat; public short simpleShort; public long simpleLong; public double simpleDouble; }
/** * Created by restainoa on 2/3/17. */ @UseStag public class ModelWithNestedInterface { protected String field; public interface NestedInterface { class NestedModel { protected String otherField; } } }
@UseStag public static class Nested { private String mNested; public String getNested() { return mNested; } public void setNested(String mNested) { this.mNested = mNested; } }
@UseStag public static class NestedExtensionFromNoAnnotation extends NestedWithoutAnnotation { private String mNestedExtensionFromNoAnnotation; public String getNestedExtensionFromNoAnnotation() { return mNestedExtensionFromNoAnnotation; } public void setNestedExtensionFromNoAnnotation(String mNestedExtensionFromNoAnnotation) { this.mNestedExtensionFromNoAnnotation = mNestedExtensionFromNoAnnotation; } }
/** * A test case which tests a generic type that has wildcards. The type used is {@link DynamicallyTypedModel}. */ @UseStag public class DynamicallyTypedWildcard { public List<DynamicallyTypedModel<?, ?>> models; public String name; }
/** * An integration test for various array types. */ @UseStag public class NativeArrayTypes { public String[] mStrings; public Integer[] mIntegers; public Boolean[] mBooleans; public int[] mInts; public boolean[] mBools; }
/** * Testing adapter creation for a model class * that relies on an externally defined class. * <p> * Created by mohammad.yasir on 28/12/16. */ @UseStag public class TestExternalExample { public GenericClass<ExternalModel1> mTesting; }
@SuppressWarnings("FieldNameHidesFieldInSuperclass") @UseStag public class SubClassWithSameVariableName extends ClassWithArrayTypes { public ArrayList<String> stringList; }
/** * Test the extension of a partially resolved generic class. */ @UseStag public class ConcreteDataList extends AbstractDataList<BaseExternalModel> { }
@UseStag public static class InnerModel { public int version; } }
@UseStag public static class NestedExtension extends NativeJavaModel { private String mNestedExtension; public String getNestedExtension() { return mNestedExtension; } public void setNestedExtension(String mNestedExtension) { this.mNestedExtension = mNestedExtension; } }
@UseStag public class WildcardModel { public String name; public ExternalModelGeneric<?> externalModelGeneric; }
/** * A model with multiple generic types. Acting as a use case for {@link DynamicallyTypedWildcard}. */ @UseStag public class DynamicallyTypedModel<T extends BaseExternalModel, V extends ExternalModelGeneric<T>> { public T videoValue; public V dataListValue; }
/** * Model class to demonstrate the usage of FIELD_OPTION_NONE */ @UseStag(FieldOption.NONE) public class FieldOptionNoneExample { public int simpleInt; public float simpleFloat; public short simpleShort; public long simpleLong; public double simpleDouble; }
/** * Example where Object is one of the member variables */ @UseStag public class ObjectExample { Object objectExample; }
@UseStag public class ExternalModelDerivedExample extends BaseExternalModel { public Boolean derivedBoolean; }
/** * This class is separate/redundant with respect to those in NestedJavaModel so that we can * observe the behavior of incremental compilation via manual manipulation. */ @UseStag public class NativeJavaModelExtension extends NativeJavaModel { private String mAdditionalField; public String getAdditionalField() { return mAdditionalField; } public void setAdditionalField(String additionalField) { this.mAdditionalField = additionalField; } }