亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? valueexpressionimpl.java

?? java屬性邦定的(JSR-295)的一個實現
?? JAVA
字號:
/*
 * Copyright (C) 2007 Sun Microsystems, Inc. All rights reserved. Use is
 * subject to license terms.
 */

package org.jdesktop.el.impl;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.util.List;
import java.util.Collections;

import org.jdesktop.el.ELContext;
import org.jdesktop.el.ELException;
import org.jdesktop.el.ELResolver;
import org.jdesktop.el.Expression;
import org.jdesktop.el.ExpressionFactory;
import org.jdesktop.el.FunctionMapper;
import org.jdesktop.el.PropertyNotFoundException;
import org.jdesktop.el.PropertyNotWritableException;
import org.jdesktop.el.ValueExpression;
import org.jdesktop.el.VariableMapper;

import org.jdesktop.el.impl.lang.ELSupport;
import org.jdesktop.el.impl.lang.EvaluationContext;
import org.jdesktop.el.impl.lang.ExpressionBuilder;
import org.jdesktop.el.impl.parser.AstLiteralExpression;
import org.jdesktop.el.impl.parser.Node;
import org.jdesktop.el.impl.util.ReflectionUtil;

/**
 * An <code>Expression</code> that can get or set a value.
 * 
 * <p>
 * In previous incarnations of this API, expressions could only be read.
 * <code>ValueExpression</code> objects can now be used both to retrieve a
 * value and to set a value. Expressions that can have a value set on them are
 * referred to as l-value expressions. Those that cannot are referred to as
 * r-value expressions. Not all r-value expressions can be used as l-value
 * expressions (e.g. <code>"${1+1}"</code> or
 * <code>"${firstName} ${lastName}"</code>). See the EL Specification for
 * details. Expressions that cannot be used as l-values must always return
 * <code>true</code> from <code>isReadOnly()</code>.
 * </p>
 * 
 * <p>
 * <code>The {@link ExpressionFactory#createValueExpression} method
 * can be used to parse an expression string and return a concrete instance
 * of <code>ValueExpression</code> that encapsulates the parsed expression.
 * The {@link FunctionMapper} is used at parse time, not evaluation time, 
 * so one is not needed to evaluate an expression using this class.  
 * However, the {@link ELContext} is needed at evaluation time.</p>
 *
 * <p>The {@link #getValue}, {@link #setValue}, {@link #isReadOnly} and
 * {@link #getType} methods will evaluate the expression each time they are
 * called. The {@link ELResolver} in the <code>ELContext</code> is used to 
 * resolve the top-level variables and to determine the behavior of the
 * <code>.</code> and <code>[]</code> operators. For any of the four methods,
 * the {@link ELResolver#getValue} method is used to resolve all properties 
 * up to but excluding the last one. This provides the <code>base</code> 
 * object. At the last resolution, the <code>ValueExpression</code> will 
 * call the corresponding {@link ELResolver#getValue}, 
 * {@link ELResolver#setValue}, {@link ELResolver#isReadOnly} or 
 * {@link ELResolver#getType} method, depending on which was called on 
 * the <code>ValueExpression</code>.
 * </p>
 *
 * <p>See the notes about comparison, serialization and immutability in 
 * the {@link Expression} javadocs.
 *
 * @see javax.el.ELResolver
 * @see javax.el.Expression
 * @see javax.el.ExpressionFactory
 * @see javax.el.ValueExpression
 * 
 * @author Jacob Hookom [jacob@hookom.net]
 * @version $Change: 181177 $$DateTime: 2001/06/26 08:45:09 $$Author: kchung $
 */
public final class ValueExpressionImpl extends ValueExpression implements
        Externalizable {

    private Class expectedType;

    private String expr;

    private FunctionMapper fnMapper;

    private VariableMapper varMapper;

    private transient Node node;

    public ValueExpressionImpl() {

    }

    /**
     * 
     */
    public ValueExpressionImpl(String expr, Node node, FunctionMapper fnMapper,
            VariableMapper varMapper, Class expectedType) {
        this.expr = expr;
        this.node = node;
        this.fnMapper = fnMapper;
        this.varMapper = varMapper;
        this.expectedType = expectedType;
    }

    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#equals(java.lang.Object)
     */
    public boolean equals(Object obj) {
        return (obj instanceof ValueExpressionImpl && obj.hashCode() == this
                .hashCode());
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.el.ValueExpression#getExpectedType()
     */
    public Class getExpectedType() {
        return this.expectedType;
    }

    /**
     * Returns the type the result of the expression will be coerced to after
     * evaluation.
     * 
     * @return the <code>expectedType</code> passed to the
     *         <code>ExpressionFactory.createValueExpression</code> method
     *         that created this <code>ValueExpression</code>.
     * 
     * @see javax.el.Expression#getExpressionString()
     */
    public String getExpressionString() {
        return this.expr;
    }

    /**
     * @return
     * @throws ELException
     */
    private Node getNode() throws ELException {
        if (this.node == null) {
            this.node = ExpressionBuilder.createNode(this.expr);
        }
        return this.node;
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.el.ValueExpression#getType(javax.el.ELContext)
     */
    public Class getType(ELContext context) throws PropertyNotFoundException,
            ELException {
        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
                this.varMapper, this);
        return this.getNode().getType(ctx);
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.el.ValueExpression#getValue(javax.el.ELContext)
     */
    public Object getValue(ELContext context) throws PropertyNotFoundException,
            ELException {
        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
                this.varMapper, this);
        Object value = this.getNode().getValue(ctx);
        if (this.expectedType != null) {
            return ELSupport.coerceToType(value, this.expectedType);
        }
        return value;
    }
    
    public Result getResult(ELContext context, boolean trackResolvedObjects) throws PropertyNotFoundException, 
            ELException {
        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper, this.varMapper, this, trackResolvedObjects);
        Object value = this.getNode().getValue(ctx);

        List<ResolvedProperty> resolvedProperties;

        if (trackResolvedObjects) {
            resolvedProperties = ctx.getResolvedProperties();
        } else {
            resolvedProperties = Collections.emptyList();
        }

        if (value == ELContext.UNRESOLVABLE_RESULT) {
            return new Result(Result.Type.UNRESOLVABLE, null, resolvedProperties);
        }
        
        value = ELSupport.coerceToType(value, this.expectedType);
        return new Result(Result.Type.VALUE, value, resolvedProperties);
    }
    
    /*
     * (non-Javadoc)
     * 
     * @see java.lang.Object#hashCode()
     */
    public int hashCode() {
        return this.expr.hashCode();
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.el.ValueExpression#isLiteralText()
     */
    public boolean isLiteralText() {
        try {
            return this.getNode() instanceof AstLiteralExpression;
        } catch (ELException ele) {
            return false;
        }
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.el.ValueExpression#isReadOnly(javax.el.ELContext)
     */
    public boolean isReadOnly(ELContext context)
            throws PropertyNotFoundException, ELException {
        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
                this.varMapper, this);
        return this.getNode().isReadOnly(ctx);
    }

    public void readExternal(ObjectInput in) throws IOException,
            ClassNotFoundException {
        this.expr = in.readUTF();
        String type = in.readUTF();
        if (!"".equals(type)) {
            this.expectedType = ReflectionUtil.forName(type);
        }
        this.fnMapper = (FunctionMapper) in.readObject();
        this.varMapper = (VariableMapper) in.readObject();
    }

    /*
     * (non-Javadoc)
     * 
     * @see javax.el.ValueExpression#setValue(javax.el.ELContext,
     *      java.lang.Object)
     */
    public void setValue(ELContext context, Object value)
            throws PropertyNotFoundException, PropertyNotWritableException,
            ELException {
        EvaluationContext ctx = new EvaluationContext(context, this.fnMapper,
                this.varMapper, this);
        this.getNode().setValue(ctx, value);
    }

    public void writeExternal(ObjectOutput out) throws IOException {
        out.writeUTF(this.expr);
        out.writeUTF((this.expectedType != null) ? this.expectedType.getName()
                : "");
        out.writeObject(this.fnMapper);
        out.writeObject(this.varMapper);
    }

    public String toString() {
        return "ValueExpression["+this.expr+"]";
    }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
秋霞国产午夜精品免费视频| 国产精品一区二区久久不卡| 日韩成人伦理电影在线观看| 国产精品1区二区.| 91国产丝袜在线播放| 久久亚洲春色中文字幕久久久| 自拍偷在线精品自拍偷无码专区 | 成人av午夜影院| 欧美日韩在线直播| 亚洲国产精品成人综合色在线婷婷| 亚洲福利一区二区三区| 99久久综合精品| 久久夜色精品国产噜噜av| 亚洲国产成人一区二区三区| 日韩中文字幕区一区有砖一区| 99国产精品国产精品久久| 日韩欧美的一区| 五月天国产精品| 成人v精品蜜桃久久一区| 日韩欧美国产电影| 亚欧色一区w666天堂| 99国产精品99久久久久久| 国产亚洲va综合人人澡精品| 日韩国产成人精品| 欧美日韩一卡二卡三卡| 玉米视频成人免费看| 成人一区在线看| 国产亚洲女人久久久久毛片| 蜜臀av一区二区在线免费观看 | 久久狠狠亚洲综合| 欧美日韩激情一区二区| 亚洲最新视频在线播放| 91在线国内视频| 综合av第一页| 91麻豆免费看| 亚洲美女免费在线| 91久久免费观看| 亚洲一卡二卡三卡四卡五卡| 在线免费观看日本一区| 亚洲制服欧美中文字幕中文字幕| 91国偷自产一区二区三区成为亚洲经典 | 国产精品三级久久久久三级| 天堂av在线一区| 亚洲欧美成人一区二区三区| 成人激情图片网| 久久人人爽人人爽| 久久成人免费网站| 欧美岛国在线观看| 激情图区综合网| 久久久777精品电影网影网| 美女mm1313爽爽久久久蜜臀| 欧美电视剧在线观看完整版| 国产在线国偷精品免费看| 久久久精品综合| 成人app在线观看| 亚洲欧美激情一区二区| 欧美亚洲尤物久久| 免费在线看成人av| 久久久久久**毛片大全| 91在线国产福利| 日韩激情视频网站| 久久综合国产精品| caoporn国产精品| 亚洲福利一区二区| 久久综合中文字幕| 色综合久久久网| 石原莉奈一区二区三区在线观看| www久久精品| 97久久超碰国产精品| 亚洲成av人片在线观看| 精品国产电影一区二区| kk眼镜猥琐国模调教系列一区二区| 亚洲第一主播视频| 久久嫩草精品久久久精品| 91麻豆精品视频| 日本欧美肥老太交大片| 国产欧美日韩在线观看| 色婷婷av久久久久久久| 蜜桃久久久久久| 亚洲精品视频在线| 日韩欧美一区二区视频| 99久精品国产| 久久成人久久爱| 一区二区三区四区精品在线视频| 欧美一级在线观看| 91丨九色丨黑人外教| 国内偷窥港台综合视频在线播放| 一区二区成人在线| 久久精品一区二区| 欧美精品 国产精品| 粗大黑人巨茎大战欧美成人| 日本系列欧美系列| 亚洲精品国产a久久久久久| 久久奇米777| 制服丝袜成人动漫| 99免费精品视频| 国产一区二区三区观看| 污片在线观看一区二区| 1000部国产精品成人观看| 日韩欧美电影在线| 欧美日韩高清在线播放| 91在线观看污| 国产成人一区二区精品非洲| 精品在线播放午夜| 五月激情六月综合| 亚洲影院久久精品| 日韩一区欧美小说| 久久精品日产第一区二区三区高清版| 欧美日韩高清影院| 欧美视频一区二区三区| 色婷婷精品久久二区二区蜜臂av| 99免费精品在线观看| 成人污污视频在线观看| 国产盗摄一区二区| 国产高清一区日本| 国产在线播放一区| 精品在线亚洲视频| 美国毛片一区二区| 久久精品国产999大香线蕉| 人人精品人人爱| 六月婷婷色综合| 国产一区二区h| 国产成人午夜高潮毛片| 福利一区福利二区| 成人丝袜高跟foot| 99国产精品国产精品久久| 99久久久久久| 欧美日本一区二区在线观看| 51午夜精品国产| 欧美成人午夜电影| 久久久综合网站| 亚洲欧洲日韩av| 亚洲午夜免费视频| 蜜臀av一区二区在线免费观看 | 日韩精品中文字幕在线不卡尤物| 日韩一卡二卡三卡国产欧美| 欧美刺激午夜性久久久久久久 | 国产一区二区三区四区五区美女 | 亚洲精品成a人| 婷婷综合久久一区二区三区| 日本成人在线不卡视频| 国产一区二区三区美女| 成人av电影在线网| 欧美亚洲图片小说| 91麻豆精品国产| 国产亲近乱来精品视频| 亚洲欧洲在线观看av| 午夜欧美视频在线观看| 精品亚洲国内自在自线福利| 成人国产精品免费观看视频| 欧美视频完全免费看| 精品国产伦一区二区三区免费| 国产精品免费视频观看| 一区二区三区在线视频观看58| 日本人妖一区二区| 成人在线综合网| 欧美剧情片在线观看| 国产亚洲欧美在线| 怡红院av一区二区三区| 青青草精品视频| 波多野结衣欧美| 91麻豆精品国产91久久久久久久久| 国产亚洲自拍一区| 亚洲一区二区三区四区不卡 | 亚洲国产综合人成综合网站| 国内精品伊人久久久久av一坑 | 一区二区在线观看免费| 美美哒免费高清在线观看视频一区二区| 国产黑丝在线一区二区三区| 欧美区一区二区三区| 国产日韩欧美在线一区| 亚洲成av人片在线观看| 成人免费视频视频| 欧美一级免费观看| 亚洲女同女同女同女同女同69| 国产一区二区三区免费观看| 欧美日韩电影在线播放| 一区精品在线播放| 国产精品资源站在线| 欧美日韩国产片| 一区二区三区在线免费| 懂色av一区二区在线播放| 日韩一区国产二区欧美三区| 夜夜嗨av一区二区三区四季av| 成人激情校园春色| 精品sm在线观看| 三级欧美在线一区| 在线观看www91| 亚洲欧美日韩一区二区 | 一道本成人在线| 成人欧美一区二区三区白人| 国产在线精品免费| 精品国产免费人成电影在线观看四季 | 国产婷婷一区二区| 久久99国产精品麻豆| 911国产精品| 日韩国产欧美视频| 欧美视频一区二区三区| 亚洲福中文字幕伊人影院| 欧美视频一区二|