public class InjectedClass extends ModelClass
ModelAnalyzer#injectViewDataBinding(String, Map, Map, java.util.HashMap)
BOX_MAPPING, UNBOX_MAPPING
Constructor and Description |
---|
InjectedClass(java.lang.String className,
java.lang.String superClass) |
Modifier and Type | Method and Description |
---|---|
void |
addField(InjectedField field) |
void |
addMethod(InjectedMethod method) |
ModelClass |
box()
When this is a primitive type, such as boolean, this will return the boxed value,
such as Boolean.
|
ModelClass |
erasure()
Returns this class type without any generic type arguments.
|
ModelClass |
getComponentType()
For arrays, lists, and maps, this returns the contained value.
|
protected ModelField[] |
getDeclaredFields() |
protected ModelMethod[] |
getDeclaredMethods() |
java.lang.String |
getJniDescription()
Returns the JNI description of the method which can be used to lookup it in SDK.
|
ModelClass |
getSuperclass()
If this represents a class, the super class that it extends is returned.
|
java.util.List<ModelClass> |
getTypeArguments() |
boolean |
isArray() |
boolean |
isAssignableFrom(ModelClass that)
Returns whether or not the type associated with
that can be assigned to
the type associated with this ModelClass. |
boolean |
isBoolean() |
boolean |
isByte() |
boolean |
isChar() |
boolean |
isDouble() |
boolean |
isFloat() |
boolean |
isGeneric() |
boolean |
isInt() |
boolean |
isInterface() |
boolean |
isLong() |
boolean |
isNullable() |
boolean |
isObservable() |
boolean |
isPrimitive() |
boolean |
isShort() |
boolean |
isTypeVar() |
boolean |
isVoid() |
boolean |
isWildcard() |
java.lang.String |
toJavaCode() |
java.lang.String |
toString() |
ModelClass |
unbox()
When this is a boxed type, such as Integer, this will return the unboxed value,
such as int.
|
extendsViewStub, findGetterOrField, findInstanceGetter, findMethods, getAbstractMethods, getCanonicalName, getMethod, getMethod, getMethods, getMethods, getMinApi, getSimpleName, isIncomplete, isList, isMap, isObject, isObservableField, isString, isViewDataBinding
public InjectedClass(java.lang.String className, java.lang.String superClass)
public void addField(InjectedField field)
public void addMethod(InjectedMethod method)
public java.lang.String toJavaCode()
toJavaCode
in class ModelClass
public boolean isArray()
isArray
in class ModelClass
public ModelClass getComponentType()
ModelClass
getComponentType
in class ModelClass
public boolean isNullable()
isNullable
in class ModelClass
public boolean isPrimitive()
isPrimitive
in class ModelClass
public boolean isBoolean()
isBoolean
in class ModelClass
public boolean isChar()
isChar
in class ModelClass
public boolean isByte()
isByte
in class ModelClass
public boolean isShort()
isShort
in class ModelClass
public boolean isInt()
isInt
in class ModelClass
public boolean isLong()
isLong
in class ModelClass
public boolean isFloat()
isFloat
in class ModelClass
public boolean isDouble()
isDouble
in class ModelClass
public boolean isGeneric()
isGeneric
in class ModelClass
public java.util.List<ModelClass> getTypeArguments()
getTypeArguments
in class ModelClass
public boolean isTypeVar()
isTypeVar
in class ModelClass
public boolean isWildcard()
isWildcard
in class ModelClass
public boolean isInterface()
isInterface
in class ModelClass
public boolean isVoid()
isVoid
in class ModelClass
public ModelClass unbox()
ModelClass
unbox
in class ModelClass
public ModelClass box()
ModelClass
box
in class ModelClass
public boolean isObservable()
isObservable
in class ModelClass
public boolean isAssignableFrom(ModelClass that)
ModelClass
that
can be assigned to
the type associated with this ModelClass. If this and that only require boxing or unboxing
then true is returned.isAssignableFrom
in class ModelClass
that
- the ModelClass to compare.that
requires only boxing or if that
is an
implementation of or subclass of this
.public ModelClass getSuperclass()
ModelClass
null
is returned if this is not a class or interface, such as an int, or
if it is java.lang.Object or an interface that does not extend any other type.getSuperclass
in class ModelClass
public ModelClass erasure()
ModelClass
erasure
in class ModelClass
public java.lang.String getJniDescription()
ModelClass
getJniDescription
in class ModelClass
TypeUtil
protected ModelField[] getDeclaredFields()
getDeclaredFields
in class ModelClass
protected ModelMethod[] getDeclaredMethods()
getDeclaredMethods
in class ModelClass
public java.lang.String toString()
toString
in class java.lang.Object