How to Create Instance of Generic Class with Interface

2 posts
Thanks Meter: 0
 
By allenBJ, Junior Member on 18th March 2020, 02:40 PM
Post Reply Email Thread
From decompiler I got:


package com.myapp.pk1

public class B {
... ...

public interface a<T> {
void onFailed(String str1, String str2)
void onSuccess(T v1);
}
}


package com.myapp.pk2

public class MyCustomClass {
... ...
}
... ...

package com.myapp.pk3

public class C {
... ...
public static void d(boolean var0, B.a<MyCustomClass> var1){
... ...
}
}



package com.myapp.pk3

public class AppClass {
... ...
C.d(v1, new B.a<MyCustomClass>() {
public void a(MyCustomClass v3) {
... ...
}

public void onFailed(String var1, String var2) {

}
}
... ...
}

Here the instance of B.a is the callback of method C.d
How can I reate an instance of that (interface?) with my own method of onSucces and onFailed?

Thnx a lot
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes