Class OGNLShortcutExpression


  • final class OGNLShortcutExpression
    extends java.lang.Object
    Since:
    3.0.0
    • Field Detail

      • LOGGER

        private static final org.slf4j.Logger LOGGER
      • EXPRESSION_CACHE_TYPE_OGNL_SHORTCUT

        private static final java.lang.String EXPRESSION_CACHE_TYPE_OGNL_SHORTCUT
        See Also:
        Constant Field Values
      • NO_PARAMS

        private static final java.lang.Object[] NO_PARAMS
      • expressionLevels

        private final java.lang.String[] expressionLevels
    • Constructor Detail

      • OGNLShortcutExpression

        OGNLShortcutExpression​(java.lang.String[] expressionLevels)
    • Method Detail

      • evaluate

        java.lang.Object evaluate​(IEngineConfiguration configuration,
                                  java.util.Map<java.lang.String,​java.lang.Object> context,
                                  java.lang.Object root)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getContextProperty

        private static java.lang.Object getContextProperty​(java.lang.String propertyName,
                                                           java.util.Map<java.lang.String,​java.lang.Object> context,
                                                           java.lang.Object target)
                                                    throws ognl.OgnlException
        Throws:
        ognl.OgnlException
      • getObjectProperty

        private static java.lang.Object getObjectProperty​(ICache<ExpressionCacheKey,​java.lang.Object> expressionCache,
                                                          java.lang.String propertyName,
                                                          java.lang.Object target)
      • getMapProperty

        private static java.lang.Object getMapProperty​(java.lang.String propertyName,
                                                       java.util.Map<?,​?> map)
      • getListProperty

        public static java.lang.Object getListProperty​(ICache<ExpressionCacheKey,​java.lang.Object> expressionCache,
                                                       java.lang.String propertyName,
                                                       java.util.List<?> list)
      • getArrayProperty

        public static java.lang.Object getArrayProperty​(ICache<ExpressionCacheKey,​java.lang.Object> expressionCache,
                                                        java.lang.String propertyName,
                                                        java.lang.Object[] array)
      • getEnumerationProperty

        public static java.lang.Object getEnumerationProperty​(ICache<ExpressionCacheKey,​java.lang.Object> expressionCache,
                                                              java.lang.String propertyName,
                                                              java.util.Enumeration enumeration)
      • getIteratorProperty

        public static java.lang.Object getIteratorProperty​(ICache<ExpressionCacheKey,​java.lang.Object> expressionCache,
                                                           java.lang.String propertyName,
                                                           java.util.Iterator<?> iterator)
      • getSetProperty

        public static java.lang.Object getSetProperty​(ICache<ExpressionCacheKey,​java.lang.Object> expressionCache,
                                                      java.lang.String propertyName,
                                                      java.util.Set<?> set)
      • parse

        static java.lang.String[] parse​(java.lang.String expression)
      • doParseExpr

        private static java.lang.String[] doParseExpr​(java.lang.String expression,
                                                      int level,
                                                      int offset,
                                                      int len)
      • computeMethodCacheKey

        private static ExpressionCacheKey computeMethodCacheKey​(java.lang.Class<?> targetClass,
                                                                java.lang.String propertyName)