Fix compiled artefact to include required classes from asm commons

This commit is contained in:
Mumfrey committed 2017-07-11 14:22:26 +01:00
1 parent e5a20abf65
commit 381b945951
5 files changed
+47 -9

No files matched your search

@@ -34,6 +34,7 @@ import org.spongepowered.asm.mixin.throwables.MixinException;
import org.spongepowered.asm.obfuscation.mapping.IMapping;
import org.spongepowered.asm.obfuscation.mapping.common.MappingField;
import org.spongepowered.asm.obfuscation.mapping.common.MappingMethod;
import org.spongepowered.asm.util.Constants;
import org.spongepowered.asm.util.SignaturePrinter;
import com.google.common.base.Strings;
@@ -399,6 +400,34 @@ public class MemberInfo {
return this.forceField || (this.desc != null && !this.desc.startsWith("("));
}
/**
* Get whether this member represents a constructor
*
* @return true if member name is <tt>&lt;init&gt;</tt>
*/
public boolean isConstructor() {
return Constants.CTOR.equals(this.name);
}
/**
* Get whether this member represents a class initialiser
*
* @return true if member name is <tt>&lt;clinit&gt;</tt>
*/
public boolean isClassInitialiser() {
return Constants.CLINIT.equals(this.name);
}
/**
* Get whether this member represents a constructor or class initialiser
*
* @return true if member name is <tt>&lt;init&gt;</tt> or
* <tt>&lt;clinit&gt;</tt>
*/
public boolean isInitialiser() {
return this.isConstructor() || this.isClassInitialiser();
}
/**
* Perform ultra-simple validation of the descriptor, checks that the parts
* of the descriptor are basically sane.
@@ -25,6 +25,7 @@
package org.spongepowered.asm.obfuscation.mapping.common;
import org.spongepowered.asm.obfuscation.mapping.IMapping;
import org.spongepowered.asm.util.Constants;
import com.google.common.base.Objects;
@@ -75,6 +76,10 @@ public class MappingMethod implements IMapping<MappingMethod> {
return this.desc;
}
public boolean isConstructor() {
return Constants.CTOR.equals(this.name);
}
@Override
public MappingMethod move(String newOwner) {
return new MappingMethod(newOwner, this.getSimpleName(), this.getDesc());