接口 ValueStack:com.opensymphony.xwork2.util

2024-06-12 06:58

本文主要是介绍接口 ValueStack:com.opensymphony.xwork2.util,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

相关阅读:

在 Struts 2 中自定义支持 OGNL 的标签:http://blog.csdn.net/ieayoio/article/details/49721587

API:http://www.boyunjian.com/javadoc/com.opensymphony/xwork-core/2.1.6/_/com/opensymphony/xwork2/util/ValueStack.html

com.opensymphony.xwork2.util

接口 ValueStack

  • 所有已知实现类:
    OgnlValueStack


    public interface ValueStack
    ValueStack allows multiple beans to be pushed in and dynamic EL expressions to be evaluated against it. When evaluating an expression, the stack will be searched down the stack, from the latest objects pushed in to the earliest, looking for a bean with a getter or setter for the given property or a method of the given name (depending on the expression being evaluated).
    • 字段概要

      字段  
      限定符和类型 字段和说明
      static java.lang.String REPORT_ERRORS_ON_NO_PROP 
      static java.lang.String VALUE_STACK 
    • 方法概要

      方法  
      限定符和类型 方法和说明
      java.lang.String findString(java.lang.String expr) 
      java.lang.String findString(java.lang.String expr, boolean throwExceptionOnFailure) 
      java.lang.Object findValue(java.lang.String expr)
      Find a value by evaluating the given expression against the stack in the default search order.
      java.lang.Object findValue(java.lang.String expr, boolean throwExceptionOnFailure) 
      java.lang.Object findValue(java.lang.String expr, java.lang.Class asType)
      Find a value by evaluating the given expression against the stack in the default search order.
      java.lang.Object findValue(java.lang.String expr, java.lang.Class asType, boolean throwExceptionOnFailure) 
      java.util.Map<java.lang.String,java.lang.Object> getContext()
      Gets the context for this value stack.
      java.util.Map<java.lang.Object,java.lang.Object> getExprOverrides()
      Gets the override map if anyone exists.
      CompoundRoot getRoot()
      Get the CompoundRoot which holds the objects pushed onto the stack
      java.lang.Object peek()
      Get the object on the top of the stack  without changing the stack.
      java.lang.Object pop()
      Get the object on the top of the stack and  remove it from the stack.
      void push(java.lang.Object o)
      Put this object onto the top of the stack
      void set(java.lang.String key, java.lang.Object o)
      Sets an object on the stack with the given key so it is retrievable by  findValue(String), findValue(String, Class)
      void setDefaultType(java.lang.Class defaultType)
      Sets the default type to convert to if no type is provided when getting a value.
      void setExprOverrides(java.util.Map<java.lang.Object,java.lang.Object> overrides)
      Set a override map containing  key -> values that takes precedent when doing find operations on the ValueStack.
      void setValue(java.lang.String expr, java.lang.Object value)
      Attempts to set a property on a bean in the stack with the given expression using the default search order.
      void setValue(java.lang.String expr, java.lang.Object value, boolean throwExceptionOnFailure)
      Attempts to set a property on a bean in the stack with the given expression using the default search order.
      int size()
      Get the number of objects in the stack
    • 方法详细资料

      • getContext
        java.util.Map<java.lang.String,java.lang.Object> getContext()
        Gets the context for this value stack. The context holds all the information in the value stack and it's surroundings.
        返回:
        the context.
      • setDefaultType
        void setDefaultType(java.lang.Class defaultType)
        Sets the default type to convert to if no type is provided when getting a value.
        参数:
        defaultType - the new default type
      • setExprOverrides
        void setExprOverrides(java.util.Map<java.lang.Object,java.lang.Object> overrides)
        Set a override map containing  key -> values that takes precedent when doing find operations on the ValueStack.

        See the unit test for ValueStackTest for examples.
        参数:
        overrides - overrides map.
      • getExprOverrides
        java.util.Map<java.lang.Object,java.lang.Object> getExprOverrides()
        Gets the override map if anyone exists.
        返回:
        the override map,  null if not set.
      • getRoot
        CompoundRoot getRoot()
        Get the CompoundRoot which holds the objects pushed onto the stack
        返回:
        the root
      • setValue
        void setValue(java.lang.String expr,java.lang.Object value)
        Attempts to set a property on a bean in the stack with the given expression using the default search order.
        参数:
        expr - the expression defining the path to the property to be set.
        value - the value to be set into the named property
      • setValue
        void setValue(java.lang.String expr,java.lang.Object value,boolean throwExceptionOnFailure)
        Attempts to set a property on a bean in the stack with the given expression using the default search order.
        参数:
        expr - the expression defining the path to the property to be set.
        value - the value to be set into the named property
        throwExceptionOnFailure - a flag to tell whether an exception should be thrown if there is no property with the given name.
      • findString
        java.lang.String findString(java.lang.String expr)
      • findString
        java.lang.String findString(java.lang.String expr,boolean throwExceptionOnFailure)
      • findValue
        java.lang.Object findValue(java.lang.String expr)
        Find a value by evaluating the given expression against the stack in the default search order.
        参数:
        expr - the expression giving the path of properties to navigate to find the property value to return
        返回:
        the result of evaluating the expression
      • findValue
        java.lang.Object findValue(java.lang.String expr,boolean throwExceptionOnFailure)
      • findValue
        java.lang.Object findValue(java.lang.String expr,java.lang.Class asType)
        Find a value by evaluating the given expression against the stack in the default search order.
        参数:
        expr - the expression giving the path of properties to navigate to find the property value to return
        asType - the type to convert the return value to
        返回:
        the result of evaluating the expression
      • findValue
        java.lang.Object findValue(java.lang.String expr,java.lang.Class asType,boolean throwExceptionOnFailure)
      • peek
        java.lang.Object peek()
        Get the object on the top of the stack  without changing the stack.
        返回:
        the object on the top.
        另请参阅:
        CompoundRoot.peek()
      • pop
        java.lang.Object pop()
        Get the object on the top of the stack and  remove it from the stack.
        返回:
        the object on the top of the stack
        另请参阅:
        CompoundRoot.pop()
      • push
        void push(java.lang.Object o)
        Put this object onto the top of the stack
        参数:
        o - the object to be pushed onto the stack
        另请参阅:
        CompoundRoot.push(Object)
      • set
        void set(java.lang.String key,java.lang.Object o)
        Sets an object on the stack with the given key so it is retrievable by  findValue(String)findValue(String, Class)
        参数:
        key - the key
        o - the object
      • size
        int size()
        Get the number of objects in the stack
        返回:
        the number of objects in the stack











这篇关于接口 ValueStack:com.opensymphony.xwork2.util的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1053500

相关文章

SpringBoot实现不同接口指定上传文件大小的具体步骤

《SpringBoot实现不同接口指定上传文件大小的具体步骤》:本文主要介绍在SpringBoot中通过自定义注解、AOP拦截和配置文件实现不同接口上传文件大小限制的方法,强调需设置全局阈值远大于... 目录一  springboot实现不同接口指定文件大小1.1 思路说明1.2 工程启动说明二 具体实施2

基于Redisson实现分布式系统下的接口限流

《基于Redisson实现分布式系统下的接口限流》在高并发场景下,接口限流是保障系统稳定性的重要手段,本文将介绍利用Redisson结合Redis实现分布式环境下的接口限流,具有一定的参考价值,感兴趣... 目录分布式限流的核心挑战基于 Redisson 的分布式限流设计思路实现步骤引入依赖定义限流注解实现

SpringBoot实现RSA+AES自动接口解密的实战指南

《SpringBoot实现RSA+AES自动接口解密的实战指南》在当今数据泄露频发的网络环境中,接口安全已成为开发者不可忽视的核心议题,RSA+AES混合加密方案因其安全性高、性能优越而被广泛采用,本... 目录一、项目依赖与环境准备1.1 Maven依赖配置1.2 密钥生成与配置二、加密工具类实现2.1

使用Python的requests库调用API接口的详细步骤

《使用Python的requests库调用API接口的详细步骤》使用Python的requests库调用API接口是开发中最常用的方式之一,它简化了HTTP请求的处理流程,以下是详细步骤和实战示例,涵... 目录一、准备工作:安装 requests 库二、基本调用流程(以 RESTful API 为例)1.

SpringBoot+Redis防止接口重复提交问题

《SpringBoot+Redis防止接口重复提交问题》:本文主要介绍SpringBoot+Redis防止接口重复提交问题,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不... 目录前言实现思路代码示例测试总结前言在项目的使用使用过程中,经常会出现某些操作在短时间内频繁提交。例

springboot下载接口限速功能实现

《springboot下载接口限速功能实现》通过Redis统计并发数动态调整每个用户带宽,核心逻辑为每秒读取并发送限定数据量,防止单用户占用过多资源,确保整体下载均衡且高效,本文给大家介绍spring... 目录 一、整体目标 二、涉及的主要类/方法✅ 三、核心流程图解(简化) 四、关键代码详解1️⃣ 设置

spring中的ImportSelector接口示例详解

《spring中的ImportSelector接口示例详解》Spring的ImportSelector接口用于动态选择配置类,实现条件化和模块化配置,关键方法selectImports根据注解信息返回... 目录一、核心作用二、关键方法三、扩展功能四、使用示例五、工作原理六、应用场景七、自定义实现Impor

MybatisPlus service接口功能介绍

《MybatisPlusservice接口功能介绍》:本文主要介绍MybatisPlusservice接口功能介绍,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友... 目录Service接口基本用法进阶用法总结:Lambda方法Service接口基本用法MyBATisP

Java中的Closeable接口及常见问题

《Java中的Closeable接口及常见问题》Closeable是Java中的一个标记接口,用于表示可以被关闭的对象,它定义了一个标准的方法来释放对象占用的系统资源,下面给大家介绍Java中的Clo... 目录1. Closeable接口概述2. 主要用途3. 实现类4. 使用方法5. 实现自定义Clos

java对接第三方接口的三种实现方式

《java对接第三方接口的三种实现方式》:本文主要介绍java对接第三方接口的三种实现方式,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录HttpURLConnection调用方法CloseableHttpClient调用RestTemplate调用总结在日常工作