All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.basking2.sdsai.itrex.functions.java.ClassOfFunction Maven / Gradle / Ivy

There is a newer version: 1.1.23
Show newest version
package com.github.basking2.sdsai.itrex.functions.java;

import com.github.basking2.sdsai.itrex.EvaluationContext;
import com.github.basking2.sdsai.itrex.SExprRuntimeException;
import com.github.basking2.sdsai.itrex.functions.AbstractFunction1;

import java.util.Iterator;

public class ClassOfFunction extends AbstractFunction1> {

    @Override
    protected Class applyImpl(final String className, final Iterator rest, final EvaluationContext context) {
        try {
            return Class.forName(className);
        }
        catch (final ClassNotFoundException e) {
            throw new SExprRuntimeException("Loading class "+className, e);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy