AP resolves method mappings in superclasses when direct mapping fails

This commit is contained in:
Mumfrey committed 2017-08-09 18:08:22 +01:00
1 parent f1f60c3ee8
commit d8c4f6f0a7
10 files changed
+269 -50

No files matched your search

@@ -109,6 +109,17 @@ public interface IMapping<TMapping> {
* @return the mapping descriptor
*/
public abstract String getDesc();
/**
* Get the next most immediate super-implementation of this mapping. For
* example if the mapping is a method and the method overrides a method in
* the immediate superclass, return that method. Can return null if no
* superclass is available or if no superclass definition exists.
*
* @return the method immediately overridden by this method, or null if not
* present or not resolvable
*/
public abstract TMapping getSuper();
/**
* Get a representation of this mapping for serialisation. Individual
@@ -75,6 +75,11 @@ public class MappingField implements IMapping<MappingField> {
return this.desc;
}
@Override
public MappingField getSuper() {
return null;
}
@Override
public MappingField move(String newOwner) {
return new MappingField(newOwner, this.getName(), this.getDesc());
@@ -76,6 +76,11 @@ public class MappingMethod implements IMapping<MappingMethod> {
return this.desc;
}
@Override
public MappingMethod getSuper() {
return null;
}
public boolean isConstructor() {
return Constants.CTOR.equals(this.name);
}