mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2025-01-08 07:54:11 -08:00
Minor code style improvements
This commit is contained in:
parent
1b0bacd90c
commit
0f39dbbdd4
|
@ -32,11 +32,8 @@ import org.teavm.model.MethodHolder;
|
||||||
import org.teavm.model.MethodReader;
|
import org.teavm.model.MethodReader;
|
||||||
|
|
||||||
public class WasmDependencyListener extends AbstractDependencyListener implements ClassHolderTransformer {
|
public class WasmDependencyListener extends AbstractDependencyListener implements ClassHolderTransformer {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void classReached(DependencyAgent agent, String className, CallLocation location) {
|
public void classReached(DependencyAgent agent, String className, CallLocation location) {
|
||||||
super.classReached(agent, className, location);
|
|
||||||
|
|
||||||
for (MethodReader reader : agent.getClassSource().get(className).getMethods()) {
|
for (MethodReader reader : agent.getClassSource().get(className).getMethods()) {
|
||||||
AnnotationReader annotation = reader.getAnnotations().get(Export.class.getName());
|
AnnotationReader annotation = reader.getAnnotations().get(Export.class.getName());
|
||||||
if (annotation != null) {
|
if (annotation != null) {
|
||||||
|
|
|
@ -109,7 +109,7 @@ public interface ClassReaderSource {
|
||||||
default Stream<MethodReader> overriddenMethods(MethodReference method) {
|
default Stream<MethodReader> overriddenMethods(MethodReference method) {
|
||||||
return getAncestorClasses(method.getClassName())
|
return getAncestorClasses(method.getClassName())
|
||||||
.map(cls -> cls.getMethod(method.getDescriptor()))
|
.map(cls -> cls.getMethod(method.getDescriptor()))
|
||||||
.filter(candidate -> candidate != null);
|
.filter(Objects::nonNull);
|
||||||
}
|
}
|
||||||
|
|
||||||
default Optional<Boolean> isSuperType(String superType, String subType) {
|
default Optional<Boolean> isSuperType(String superType, String subType) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user