raven-compiler/src/main/java/org/raven/compiler/Method.java
/**
     * Invoke a super() call to a java class.This function inserts logic to find the best
     * super constructor given that the parameters are dynamic. If type coercion is not possible
     * the constructor will throw an illegal arguments exception
     *
     * @param params The parameters to pass in the super call
     */
Invoke a super() call to a java class.This function inserts logic to find the best
super constructor given that the parameters are dynamic. If type coercion is not possible
the constructor will throw an illegal arguments exception

@param params The parameters to pass in the super call
Invoke a super () call to a java class . This function inserts logic to find the best super constructor given that the parameters are dynamic . If type coercion is not possible the constructor will throw an illegal arguments exception @param params The parameters to pass in the super call
private void invokeJavaSuper(final Statement call, final Expression[] params) {
        try {
            final Class clazz = Class.forName(ctx.getClassDef().getSuper().toString());
            final LinkedList<Class[]> candidates = new LinkedList<>();
            for (final java.lang.reflect.Constructor c : clazz.getConstructors()) {
                if (c.getParameterCount() == params.length) {
                    candidates.add(c.getParameterTypes());
                }
            }
            scope.putVar(" TL_PARAMS ");
            scope.putVar(" SUPER_PARAMS ");
            visitListDef(new ListDef(params));
            visitVarInsn(ASTORE, getLocal(" TL_PARAMS "));
            putSuperCalls(clazz, candidates, params);
        } catch (ClassNotFoundException | NoSuchMethodException e) {
            e.printStackTrace();
            error(call, "Cannot resolve super()");
        }
    }
private void invokeJavaSuper ( final Statement call , final Expression [ ] params ) { try { final Class clazz = Class . forName ( ctx . getClassDef ( ) . getSuper ( ) . toString ( ) ) ; final LinkedList < Class [ ] > candidates = new LinkedList < > ( ) ; for ( final java . lang . reflect . Constructor c : clazz . getConstructors ( ) ) { if ( c . getParameterCount ( ) == params . length ) { candidates . add ( c . getParameterTypes ( ) ) ; } } scope . putVar ( " TL_PARAMS " ) ; scope . putVar ( " SUPER_PARAMS " ) ; visitListDef ( new ListDef ( params ) ) ; visitVarInsn ( ASTORE , getLocal ( " TL_PARAMS " ) ) ; putSuperCalls ( clazz , candidates , params ) ; } catch ( ClassNotFoundException | NoSuchMethodException e ) { e . printStackTrace ( ) ; error ( call , "Cannot resolve super()" ) ; } }
Invoke a super() call to a java class.This function inserts logic to find the best
 super constructor given that the parameters are dynamic.
Invoke a super () call to a java class . This function inserts logic to find the best super constructor given that the parameters are dynamic .
// store the parameters as a list