epoxy-processor / com.airbnb.epoxy.processor / GeneratedModelInfo

GeneratedModelInfo

abstract class GeneratedModelInfo

Types

AttributeGroup

class AttributeGroup

ConstructorInfo

data class ConstructorInfo

Constructors

<init>

GeneratedModelInfo(memoizer: Memoizer)

Properties

annotations

val annotations: MutableList<AnnotationSpec>

attributeGroups

val attributeGroups: MutableList<GeneratedModelInfo.AttributeGroup>

attributeInfo

val attributeInfo: MutableList<AttributeInfo>

constructors

val constructors: MutableList<GeneratedModelInfo.ConstructorInfo>

generatedName

lateinit var generatedName: ClassName

includeOtherLayoutOptions

var includeOtherLayoutOptions: Boolean

If true, any layout classes that exist that are prefixed by the default layout are included in the generated model as other layout options via a generated method for each alternate layout.

isProgrammaticView

val isProgrammaticView: Boolean

isStyleable

val isStyleable: Boolean

isSuperClassAlsoGenerated

val isSuperClassAlsoGenerated: Boolean

layoutParams

var layoutParams: Size

An option set via com.airbnb.epoxy.ModelView.autoLayout to have Epoxy create the view programmatically instead of via xml layout resource inflation.

memoizer

val memoizer: Memoizer

methodsReturningClassType

val methodsReturningClassType: MutableSet<MethodInfo>

modelType

var modelType: TypeName?

Get the object type this model is typed with.

parameterizedGeneratedName

lateinit var parameterizedGeneratedName: TypeName

shouldGenerateModel

var shouldGenerateModel: Boolean

styleBuilderInfo

var styleBuilderInfo: ParisStyleAttributeInfo?

The info for the style builder if this is a model view annotated with @Styleable. Null otherwise.

superClassElement

lateinit var superClassElement: TypeElement

superClassName

lateinit var superClassName: TypeName

typeVariableNames

val typeVariableNames: MutableList<TypeVariableName>

typeVariables

val typeVariables: Iterable<TypeVariableName>

Functions

addAttribute

fun addAttribute(attributeInfo: AttributeInfo): Unit

addAttributeGroup

fun addAttributeGroup(groupName: String?, attributes: List<AttributeInfo>): Unit

addAttributeIfNotExists

fun addAttributeIfNotExists(attributeToAdd: AttributeInfo): Unit

addAttributes

fun addAttributes(attributesToAdd: Collection<AttributeInfo>): Unit

additionalOriginatingElements

open fun additionalOriginatingElements(): List<Element>

attributeGroup

fun attributeGroup(attribute: AttributeInfo): GeneratedModelInfo.AttributeGroup?

collectMethodsReturningClassType

fun collectMethodsReturningClassType(superModelClass: TypeElement): Unit

Get information about methods returning class type of the original class so we can duplicate them in the generated class for chaining purposes

getClassConstructors

fun getClassConstructors(classElement: TypeElement?): List<GeneratedModelInfo.ConstructorInfo>

Get information about constructors of the original class so we can duplicate them in the generated class and call through to super with the proper parameters

hasEmptyConstructor

fun hasEmptyConstructor(): Boolean

isOverload

fun isOverload(attribute: AttributeInfo): Boolean

originatingElements

fun originatingElements(): List<Element>

The elements that influence the generation of this model. eg base model class for @EpoxyModelClass, view class for @ModelView, etc

otherAttributesInGroup

fun otherAttributesInGroup(attribute: AttributeInfo): List<AttributeInfo>

If this attribute is in a group, returns the other attributes contained in that group.

setStyleable

fun setStyleable(parisStyleAttributeInfo: ParisStyleAttributeInfo): Unit

toString

open fun toString(): String

Companion Object Properties

GENERATED_CLASS_NAME_SUFFIX

const val GENERATED_CLASS_NAME_SUFFIX: String

GENERATED_MODEL_SUFFIX

const val GENERATED_MODEL_SUFFIX: String

RESET_METHOD

const val RESET_METHOD: String

Companion Object Functions

buildParamSpecs

fun buildParamSpecs(params: List<VariableElement>): List<ParameterSpec>

Extension Functions

mutex

fun Any.mutex(): Mutex

Inheritors

ModelViewInfo

class ModelViewInfo : GeneratedModelInfo