Class InjectedMethod


  • public class InjectedMethod
    extends ModelMethod
    A class that can be used by ModelAnalyzer without any backing model. This is used for methods on ViewDataBinding subclasses that haven't been generated yet.
    See Also:
    ModelAnalyzer#injectViewDataBinding(String, Map, Map, java.util.Map)
    • Constructor Detail

      • InjectedMethod

        public InjectedMethod​(android.databinding.tool.reflection.InjectedClass containingClass,
                              boolean isStatic,
                              java.lang.String name,
                              android.databinding.tool.reflection.ImportBag imports,
                              java.lang.String returnType,
                              java.lang.String... parameters)
    • Method Detail

      • getDeclaringClass

        public android.databinding.tool.reflection.ModelClass getDeclaringClass()
        Specified by:
        getDeclaringClass in class ModelMethod
      • getParameterTypes

        public android.databinding.tool.reflection.ModelClass[] getParameterTypes()
        Specified by:
        getParameterTypes in class ModelMethod
      • getName

        public java.lang.String getName()
        Specified by:
        getName in class ModelMethod
      • getReturnType

        public android.databinding.tool.reflection.ModelClass getReturnType​(java.util.List<android.databinding.tool.reflection.ModelClass> args)
        Specified by:
        getReturnType in class ModelMethod
      • getMinApi

        public int getMinApi()
        Description copied from class: ModelMethod
        Since when this method is available. Important for Binding expressions so that we don't call non-existing APIs when setting UI.
        Specified by:
        getMinApi in class ModelMethod
        Returns:
        The SDK_INT where this method was added. If it is not a framework method, should return 1.
      • getJniDescription

        public java.lang.String getJniDescription()
        Description copied from class: ModelMethod
        Returns the JNI description of the method which can be used to lookup it in SDK.
        Specified by:
        getJniDescription in class ModelMethod
        See Also:
        TypeUtil
      • isVarArgs

        public boolean isVarArgs()
        Specified by:
        isVarArgs in class ModelMethod
        Returns:
        true if the final parameter is a varargs parameter.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object