コード例 #1
0
        public Value toValue(Object par0)
        {
            if (par0 is Value)
            {
                return((Value)par0);
            }
            if (par0 is Variable)
            {
                return(((Variable)par0).getValue());
            }
            var val = DValue.forPrimitive(par0, this.getIsolateId());

            return(val);
        }
コード例 #2
0
        public Value toValue(java.lang.Object par0)
        {
            if (par0 is Value)
            {
                return((Value)par0);
            }
            if (par0 is Variable)
            {
                return(((Variable)par0).getValue());
            }
            var val = DValue.forPrimitive(par0);

            return(val);
        }
コード例 #3
0
        public Context createContext(Object par0)
        {
            Value val;

            if (par0 is Variable)
            {
                val = ((Variable)par0).getValue();
            }
            else if (par0 is Value)
            {
                val = (Value)par0;
            }
            else if (par0 is String)
            {
                val = DValue.forPrimitive(par0, getIsolateId());
            }
            else
            {
                throw new NotImplementedException();
            }
            return(new ExpressionContext(session, frame, val));
        }