Java Code Examples for org.apache.commons.jexl3.introspection.JexlUberspect#JEXL_STRATEGY

The following examples show how to use org.apache.commons.jexl3.introspection.JexlUberspect#JEXL_STRATEGY . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Uberspect.java    From commons-jexl with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a new Uberspect.
 * @param runtimeLogger the logger used for all logging needs
 * @param sty the resolver strategy
 * @param perms the introspector permissions
 */
public Uberspect(Log runtimeLogger, JexlUberspect.ResolverStrategy sty, Permissions perms) {
    logger = runtimeLogger;
    strategy = sty == null? JexlUberspect.JEXL_STRATEGY : sty;
    permissions  = perms;
    ref = new SoftReference<Introspector>(null);
    loader = new SoftReference<ClassLoader>(getClass().getClassLoader());
    operatorMap = new ConcurrentHashMap<Class<? extends JexlArithmetic>, Set<JexlOperator>>();
    version = new AtomicInteger(0);
}
 
Example 2
Source File: SandboxJexlUberspect.java    From nexus-public with Eclipse Public License 1.0 4 votes vote down vote up
public SandboxJexlUberspect() {
  super(LogFactory.getLog(JexlEngine.class), JexlUberspect.JEXL_STRATEGY);
}
 
Example 3
Source File: SandboxUberspect.java    From syncope with Apache License 2.0 4 votes vote down vote up
SandboxUberspect() {
    super(LogFactory.getLog(JexlEngine.class), JexlUberspect.JEXL_STRATEGY);
}
 
Example 4
Source File: Engine.java    From commons-jexl with Apache License 2.0 3 votes vote down vote up
/**
 * Gets the default instance of Uberspect.
 * <p>This is lazily initialized to avoid building a default instance if there
 * is no use for it. The main reason for not using the default Uberspect instance is to
 * be able to use a (low level) introspector created with a given logger
 * instead of the default one.</p>
 * @param logger the logger to use for the underlying Uberspect
 * @param strategy the property resolver strategy
 * @return Uberspect the default uberspector instance.
 */
public static Uberspect getUberspect(Log logger, JexlUberspect.ResolverStrategy strategy) {
    if ((logger == null || logger.equals(LogFactory.getLog(JexlEngine.class)))
        && (strategy == null || strategy == JexlUberspect.JEXL_STRATEGY)) {
        return UberspectHolder.UBERSPECT;
    }
    return new Uberspect(logger, strategy);
}