Rabbit-R1/android (non root)/java/sources/kotlin/jvm/internal/FunctionReference.java
2024-05-21 17:08:36 -04:00

91 lines
2.9 KiB
Java

package kotlin.jvm.internal;
import kotlin.reflect.KCallable;
import kotlin.reflect.KFunction;
/* loaded from: classes3.dex */
public class FunctionReference extends CallableReference implements FunctionBase, KFunction {
private final int arity;
private final int flags;
@Override // kotlin.jvm.internal.FunctionBase
public int getArity() {
return this.arity;
}
public FunctionReference(int i) {
this(i, NO_RECEIVER, null, null, null, 0);
}
public FunctionReference(int i, Object obj) {
this(i, obj, null, null, null, 0);
}
public FunctionReference(int i, Object obj, Class cls, String str, String str2, int i2) {
super(obj, cls, str, str2, (i2 & 1) == 1);
this.arity = i;
this.flags = i2 >> 1;
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // kotlin.jvm.internal.CallableReference
public KFunction getReflected() {
return (KFunction) super.getReflected();
}
@Override // kotlin.jvm.internal.CallableReference
protected KCallable computeReflected() {
return Reflection.function(this);
}
@Override // kotlin.reflect.KFunction
public boolean isInline() {
return getReflected().isInline();
}
@Override // kotlin.reflect.KFunction
public boolean isExternal() {
return getReflected().isExternal();
}
@Override // kotlin.reflect.KFunction
public boolean isOperator() {
return getReflected().isOperator();
}
@Override // kotlin.reflect.KFunction
public boolean isInfix() {
return getReflected().isInfix();
}
@Override // kotlin.jvm.internal.CallableReference, kotlin.reflect.KCallable
public boolean isSuspend() {
return getReflected().isSuspend();
}
public boolean equals(Object obj) {
if (obj == this) {
return true;
}
if (obj instanceof FunctionReference) {
FunctionReference functionReference = (FunctionReference) obj;
return getName().equals(functionReference.getName()) && getSignature().equals(functionReference.getSignature()) && this.flags == functionReference.flags && this.arity == functionReference.arity && Intrinsics.areEqual(getBoundReceiver(), functionReference.getBoundReceiver()) && Intrinsics.areEqual(getOwner(), functionReference.getOwner());
}
if (obj instanceof KFunction) {
return obj.equals(compute());
}
return false;
}
public int hashCode() {
return (((getOwner() == null ? 0 : getOwner().hashCode() * 31) + getName().hashCode()) * 31) + getSignature().hashCode();
}
public String toString() {
KCallable compute = compute();
if (compute != this) {
return compute.toString();
}
return "<init>".equals(getName()) ? "constructor (Kotlin reflection is not available)" : "function " + getName() + " (Kotlin reflection is not available)";
}
}