类 ClassModel
- java.lang.Object
-
- proguard.evaluation.value.object.model.ClassModel
-
- 所有已实现的接口:
Model,ReflectiveModel<ClassModel>
public class ClassModel extends java.lang.Object implements ReflectiveModel<ClassModel>
AModelto track specific Clazz constants.
-
-
字段概要
-
从接口继承的字段 proguard.evaluation.value.object.model.reflective.ReflectiveModel
log
-
-
构造器概要
构造器 构造器 说明 ClassModel(@NotNull java.lang.Class<?> clazz)Used for creating aClassModelfor any of the primitive classes.ClassModel(@NotNull Clazz clazz)Creates a newClassModelfor the givenClazz.ClassModel(java.lang.String name)Creates a newClassModelfor an unknown class.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 booleanequals(java.lang.Object o)@Nullable ClazzgetClazz()Use this in caseisPrimitive()is true.@Nullable java.lang.StringgetModeledClassName()java.lang.Class<?>getPrimitiveClass()Use this in caseisPrimitive()is false.@NotNull java.lang.StringgetType()Returns the type of the modeled class.inthashCode()MethodResultinit(MethodExecutionInfo methodExecutionInfo, ValueCalculator valueCalculator)Execute a constructor call for the modeled class.booleanisPrimitive()booleanisUnknown()java.lang.StringtoString()-
从接口继承的方法 proguard.evaluation.value.object.model.reflective.ReflectiveModel
invoke, invokeStatic
-
-
-
-
构造器详细资料
-
ClassModel
public ClassModel(@NotNull @NotNull Clazz clazz)Creates a newClassModelfor the givenClazz.- 参数:
clazz- The class to model.
-
ClassModel
public ClassModel(java.lang.String name)
Creates a newClassModelfor an unknown class.- 参数:
name- The name of the class.
-
ClassModel
public ClassModel(@NotNull @NotNull java.lang.Class<?> clazz)Used for creating aClassModelfor any of the primitive classes.- 参数:
clazz- one of the primitive classes.int.class,boolean.class, ...- 抛出:
java.lang.IllegalArgumentException- iff a non-primitiveClassobject is passed.
-
-
方法详细资料
-
getClazz
@Nullable public @Nullable Clazz getClazz()
Use this in caseisPrimitive()is true. Otherwise, usegetPrimitiveClass()- 返回:
- the modeled
Clazz. - 抛出:
java.lang.IllegalArgumentException- if a primitive class is modeled.
-
getPrimitiveClass
public java.lang.Class<?> getPrimitiveClass()
Use this in caseisPrimitive()is false. Otherwise, usegetClazz().- 返回:
- the modeled
Class. - 抛出:
java.lang.IllegalArgumentException- if a non-primitive class is modeled.
-
isPrimitive
public boolean isPrimitive()
-
isUnknown
public boolean isUnknown()
-
getModeledClassName
@Nullable public @Nullable java.lang.String getModeledClassName()
- 返回:
- the name of the modeled class.
-
getType
@NotNull public @NotNull java.lang.String getType()
从接口复制的说明:ModelReturns the type of the modeled class.
-
init
public MethodResult init(MethodExecutionInfo methodExecutionInfo, ValueCalculator valueCalculator)
从接口复制的说明:ModelExecute a constructor call for the modeled class.It is suggested to add logic to allow running this only on a dummy model without any state.
- 指定者:
init在接口中Model- 指定者:
init在接口中ReflectiveModel<ClassModel>- 参数:
methodExecutionInfo- execution info of the target method.valueCalculator- the value calculator that should be used to create any value in the result.- 返回:
- the result of the method invocation. Since it's a constructor invocation the return value of the result is expected to be empty and the constructed value should be set as the updated instance.
-
equals
public boolean equals(java.lang.Object o)
- 覆盖:
equals在类中java.lang.Object
-
hashCode
public int hashCode()
- 覆盖:
hashCode在类中java.lang.Object
-
toString
public java.lang.String toString()
- 覆盖:
toString在类中java.lang.Object
-
-