com.github.basking2.sdsai.itrex.functions.java.ClassOfFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdsai-itrex Show documentation
Show all versions of sdsai-itrex Show documentation
An S-Expression inspiried library focused on iterators.
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