diff --git a/src/de/inetsoftware/jwebassembly/module/FunctionName.java b/src/de/inetsoftware/jwebassembly/module/FunctionName.java index ffed857..866d661 100644 --- a/src/de/inetsoftware/jwebassembly/module/FunctionName.java +++ b/src/de/inetsoftware/jwebassembly/module/FunctionName.java @@ -31,11 +31,13 @@ public class FunctionName { /** * The name in the WebAssembly. */ + @Nonnull public final String fullName; /** * The Java signature which is used in Java byte code to reference the method call. */ + @Nonnull public final String signatureName; /** @@ -50,4 +52,30 @@ public class FunctionName { fullName = className + '.' + methodName; signatureName = fullName + methodOrField.getType(); } + + /** + * {@inheritDoc} + */ + @Override + public int hashCode() { + return signatureName.hashCode(); + } + + /** + * {@inheritDoc} + */ + @Override + public boolean equals( Object obj ) { + if( this == obj ) { + return true; + } + if( obj == null ) { + return false; + } + if( getClass() != obj.getClass() ) { + return false; + } + FunctionName other = (FunctionName)obj; + return signatureName.equals( other.signatureName ); + } }