epoxy-processor / com.airbnb.epoxy.processor / ModelViewInfo

ModelViewInfo

class ModelViewInfo : GeneratedModelInfo

Constructors

<init>

ModelViewInfo(viewElement: TypeElement, typeUtils: Types, elements: Elements, logger: Logger, configManager: ConfigManager, resourceProcessor: ResourceProcessor, memoizer: Memoizer)

Properties

afterPropsSetMethodNames

val afterPropsSetMethodNames: MutableSet<String!>!

elements

val elements: Elements

fullSpanSize

val fullSpanSize: Boolean

functionsWithSingleDefaultParameter

val functionsWithSingleDefaultParameter: List<KmFunction>

generatedViewInterfaceNames

val generatedViewInterfaceNames: List<ClassName>

We generate an interface on the model to represent each interface on the view. This lets models with the same view interface be grouped together.

kotlinMetadata

val kotlinMetadata: KotlinClassMetadata?

logger

val logger: Logger

resetMethodNames

val resetMethodNames: MutableSet<String!>!

saveViewState

val saveViewState: Boolean

typeUtils

val typeUtils: Types

viewAttributes

val viewAttributes: List<ViewAttributeInfo>

viewElement

val viewElement: TypeElement

visibilityChangedMethodNames

val visibilityChangedMethodNames: MutableSet<String!>!

visibilityStateChangedMethodNames

val visibilityStateChangedMethodNames: MutableSet<String!>!

Inherited 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

addAfterPropsSetMethod

fun addAfterPropsSetMethod(methodName: String): Unit

additionalOriginatingElements

fun additionalOriginatingElements(): List<TypeElement>

addOnRecycleMethod

fun addOnRecycleMethod(methodName: String): Unit

addOnVisibilityChangedMethod

fun addOnVisibilityChangedMethod(methodName: String): Unit

addOnVisibilityStateChangedMethod

fun addOnVisibilityStateChangedMethod(methodName: String): Unit

buildProp

fun buildProp(prop: Element): ViewAttributeInfo

getLayoutResource

fun getLayoutResource(resourceProcessor: ResourceProcessor): ResourceValue

kotlinMetadata

fun Element.kotlinMetadata(): KotlinClassMetadata?

Inherited 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

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

isInGroup

fun isInGroup(attribute: AttributeInfo): 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

Extension Functions

mutex

fun Any.mutex(): Mutex