use of st.gravel.support.compiler.ast.ClassPartMapping in project gravel by gravel-st.
the class SystemMappingUpdater method linkMethods_in_identityClass_to_isStatic_.
public ClassPartMapping linkMethods_in_identityClass_to_isStatic_(final MethodNode[] _methods, final Class _javaClass, final Class _identityClass, final ClassPartMapping _cpm, final boolean _isStatic) {
final ClassPartMapping[] _ecm;
_ecm = new ClassPartMapping[1];
_ecm[0] = _cpm;
for (final MethodNode _m : _methods) {
final String _fn;
final java.lang.invoke.MethodHandle _methodHandle;
final st.gravel.core.Symbol _selector;
_selector = st.gravel.core.Symbol.value(_m.selector());
_fn = _selectorConverter.selectorAsFunctionName_(_selector);
_methodHandle = _compilerTools.methodHandleAt_numArgs_in_identityClass_isStatic_(_fn, _selector.numArgs(), _javaClass, _identityClass, _isStatic);
_ecm[0] = _ecm[0].withMethodMapping_(((MethodMapping) MethodMapping.factory.methodNode_methodHandle_definingClass_(_m, _methodHandle, _javaClass)));
}
return _ecm[0];
}
Aggregations