Add constructor with ConstantRef

This commit is contained in:
Volker 2018-08-06 12:44:47 +02:00
parent a736f41eb4
commit d16b2b63c2

View File

@ -18,6 +18,7 @@ package de.inetsoftware.jwebassembly.module;
import javax.annotation.Nonnull;
import de.inetsoftware.classparser.ConstantRef;
import de.inetsoftware.classparser.MethodInfo;
/**
@ -50,4 +51,17 @@ public class FunctionName {
fullName = className + '.' + methodName;
signatureName = fullName + method.getDescription();
}
/**
* Create a new instance from the given reference in the ConstantPool.
*
* @param method
* the Java method
*/
FunctionName( @Nonnull ConstantRef method ) {
String methodName = method.getName();
String className = method.getConstantClass().getName();
fullName = className + '.' + methodName;
signatureName = fullName + method.getType();
}
}