com.alibaba.simpleEL.dialect.tiny.TinyELEvalService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of SimpleEL Show documentation
Show all versions of SimpleEL Show documentation
simple expression language implementation
The newest version!
package com.alibaba.simpleEL.dialect.tiny;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import com.alibaba.simpleEL.eval.DefaultExpressEvalService;
public class TinyELEvalService extends DefaultExpressEvalService {
public TinyELEvalService() {
super (new TinyELPreprocessor());
}
public TinyELPreprocessor getTinyPreprocessor() {
return (TinyELPreprocessor)preprocessor;
}
@Override
public TinyELPreprocessor getPreprocessor() {
return (TinyELPreprocessor) preprocessor;
}
public void registerFunction(Method method) {
registerFunction(method.getName(), method);
}
public void registerFunction(String methodName, Method method) {
if (method == null) {
throw new IllegalArgumentException("method is null");
}
if (!Modifier.isStatic(method.getModifiers())) {
throw new IllegalArgumentException("method is not static : " + method);
}
getTinyPreprocessor().getFunctions().put(methodName, method);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy