mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix dependency error in some programs that use annotation API
This commit is contained in:
parent
49e6050871
commit
c9e9e3654a
|
@ -139,5 +139,15 @@ public class AnnotationDependencyListener extends AbstractDependencyListener {
|
|||
agent.linkClass(className, location);
|
||||
}
|
||||
}
|
||||
|
||||
if (method.getMethod().hasModifier(ElementModifier.STATIC) &&
|
||||
method.getMethod().getName().equals("$$__readAnnotations__$$")) {
|
||||
ClassReader cls = agent.getClassSource().get(method.getReference().getClassName());
|
||||
if (cls != null) {
|
||||
for (AnnotationReader annotation : cls.getAnnotations().all()) {
|
||||
agent.linkClass(annotation.getType(), location);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ import java.lang.annotation.Target;
|
|||
*
|
||||
* @author Alexey Andreev
|
||||
*/
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Retention(RetentionPolicy.CLASS)
|
||||
@Target(ElementType.TYPE)
|
||||
@interface FunctorImpl {
|
||||
String value();
|
||||
|
|
|
@ -60,8 +60,6 @@ public class PlatformGenerator implements Generator, Injector, DependencyPlugin
|
|||
case "getCurrentThread":
|
||||
method.getResult().propagate(agent.getType("java.lang.Thread"));
|
||||
break;
|
||||
case "getAnnotations":
|
||||
method.getResult();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user