166 lines
		
	
	
		
			4.7 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
			
		
		
	
	
			166 lines
		
	
	
		
			4.7 KiB
		
	
	
	
		
			Smali
		
	
	
	
	
	
| .class Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;
 | |
| .super Ljava/lang/Object;
 | |
| .source "EventUtils.java"
 | |
| 
 | |
| # interfaces
 | |
| .implements Ljava/lang/reflect/InvocationHandler;
 | |
| 
 | |
| 
 | |
| # annotations
 | |
| .annotation system Ldalvik/annotation/EnclosingClass;
 | |
|     value = Lorg/apache/commons/lang3/event/EventUtils;
 | |
| .end annotation
 | |
| 
 | |
| .annotation system Ldalvik/annotation/InnerClass;
 | |
|     accessFlags = 0x9
 | |
|     name = "EventBindingInvocationHandler"
 | |
| .end annotation
 | |
| 
 | |
| 
 | |
| # instance fields
 | |
| .field private final eventTypes:Ljava/util/Set;
 | |
|     .annotation system Ldalvik/annotation/Signature;
 | |
|         value = {
 | |
|             "Ljava/util/Set<",
 | |
|             "Ljava/lang/String;",
 | |
|             ">;"
 | |
|         }
 | |
|     .end annotation
 | |
| .end field
 | |
| 
 | |
| .field private final methodName:Ljava/lang/String;
 | |
| 
 | |
| .field private final target:Ljava/lang/Object;
 | |
| 
 | |
| 
 | |
| # direct methods
 | |
| .method public constructor <init>(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/String;)V
 | |
|     .locals 0
 | |
| 
 | |
|     .line 1
 | |
|     invoke-direct {p0}, Ljava/lang/Object;-><init>()V
 | |
| 
 | |
|     .line 2
 | |
|     iput-object p1, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->target:Ljava/lang/Object;
 | |
| 
 | |
|     .line 3
 | |
|     iput-object p2, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->methodName:Ljava/lang/String;
 | |
| 
 | |
|     .line 4
 | |
|     new-instance p1, Ljava/util/HashSet;
 | |
| 
 | |
|     invoke-static {p3}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
 | |
| 
 | |
|     move-result-object p2
 | |
| 
 | |
|     invoke-direct {p1, p2}, Ljava/util/HashSet;-><init>(Ljava/util/Collection;)V
 | |
| 
 | |
|     iput-object p1, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->eventTypes:Ljava/util/Set;
 | |
| 
 | |
|     return-void
 | |
| .end method
 | |
| 
 | |
| .method private hasMatchingParametersMethod(Ljava/lang/reflect/Method;)Z
 | |
|     .locals 2
 | |
| 
 | |
|     .line 1
 | |
|     iget-object v0, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->target:Ljava/lang/Object;
 | |
| 
 | |
|     invoke-virtual {v0}, Ljava/lang/Object;->getClass()Ljava/lang/Class;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     iget-object v1, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->methodName:Ljava/lang/String;
 | |
| 
 | |
|     invoke-virtual {p1}, Ljava/lang/reflect/Method;->getParameterTypes()[Ljava/lang/Class;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     invoke-static {v0, v1, p1}, Lorg/apache/commons/lang3/reflect/MethodUtils;->getAccessibleMethod(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Class;)Ljava/lang/reflect/Method;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     const/4 p1, 0x1
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     :goto_0
 | |
|     return p1
 | |
| .end method
 | |
| 
 | |
| 
 | |
| # virtual methods
 | |
| .method public invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;
 | |
|     .locals 1
 | |
|     .annotation system Ldalvik/annotation/Throws;
 | |
|         value = {
 | |
|             Ljava/lang/Throwable;
 | |
|         }
 | |
|     .end annotation
 | |
| 
 | |
|     .line 1
 | |
|     iget-object p1, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->eventTypes:Ljava/util/Set;
 | |
| 
 | |
|     invoke-interface {p1}, Ljava/util/Set;->isEmpty()Z
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-nez p1, :cond_1
 | |
| 
 | |
|     iget-object p1, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->eventTypes:Ljava/util/Set;
 | |
| 
 | |
|     invoke-virtual {p2}, Ljava/lang/reflect/Method;->getName()Ljava/lang/String;
 | |
| 
 | |
|     move-result-object v0
 | |
| 
 | |
|     invoke-interface {p1, v0}, Ljava/util/Set;->contains(Ljava/lang/Object;)Z
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-eqz p1, :cond_0
 | |
| 
 | |
|     goto :goto_0
 | |
| 
 | |
|     :cond_0
 | |
|     const/4 p1, 0x0
 | |
| 
 | |
|     return-object p1
 | |
| 
 | |
|     .line 2
 | |
|     :cond_1
 | |
|     :goto_0
 | |
|     invoke-direct {p0, p2}, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->hasMatchingParametersMethod(Ljava/lang/reflect/Method;)Z
 | |
| 
 | |
|     move-result p1
 | |
| 
 | |
|     if-eqz p1, :cond_2
 | |
| 
 | |
|     .line 3
 | |
|     iget-object p1, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->target:Ljava/lang/Object;
 | |
| 
 | |
|     iget-object p2, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->methodName:Ljava/lang/String;
 | |
| 
 | |
|     invoke-static {p1, p2, p3}, Lorg/apache/commons/lang3/reflect/MethodUtils;->invokeMethod(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| 
 | |
|     .line 4
 | |
|     :cond_2
 | |
|     iget-object p1, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->target:Ljava/lang/Object;
 | |
| 
 | |
|     iget-object p2, p0, Lorg/apache/commons/lang3/event/EventUtils$EventBindingInvocationHandler;->methodName:Ljava/lang/String;
 | |
| 
 | |
|     invoke-static {p1, p2}, Lorg/apache/commons/lang3/reflect/MethodUtils;->invokeMethod(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;
 | |
| 
 | |
|     move-result-object p1
 | |
| 
 | |
|     return-object p1
 | |
| .end method
 |