Package org.auraframework.instance

Examples of org.auraframework.instance.ValueProvider


    public void testLiteralNull() throws Exception {
        verifyEvaluateResult("null", ExpressionType.LITERAL, null, null);
    }

    public void testPropertyEvaluatesToNull() throws Exception {
        ValueProvider vp = new ValueProvider() {
            @Override
            public Object getValue(PropertyReference key) {
                return null;
            }
        };
View Full Code Here


        verifyEvaluateResult("nothing.here == null", ExpressionType.FUNCTION, vp, true);
        verifyEvaluateResult("nothing.here != null", ExpressionType.FUNCTION, vp, false);
    }

    public void testPropertyIsNotNull() throws Exception {
        ValueProvider vp = new ValueProvider() {
            @Override
            public Object getValue(PropertyReference key) {
                return "null? no!";
            }
        };
View Full Code Here

                    throw makeException(ite.getCause().getMessage(), ite.getCause(), def);
                }
            }
            if (stem != null) {
                if (def != null) {
                    ValueProvider vp;
                    TypeDef typeDef = def.getType(part);
                    vp = (ret instanceof ValueProvider) ? (ValueProvider) ret : (ValueProvider) typeDef.wrap(ret);
                    ret = vp.getValue(stem);
                } else {
                    getValue(ret, stem, def);
                }
            }
        } catch (AuraRuntimeException lre) {
View Full Code Here

                } catch (InvocationTargetException ite) {
                    throw makeException(ite.getCause().getMessage(), ite.getCause(), def);
                }
                loggingService.incrementNum("JavaCallCount");
            }
            ValueProvider vp;
            if (def != null) {
                TypeDef typeDef = def.getType(part);
                vp = (ret instanceof ValueProvider) ? (ValueProvider) ret : (ValueProvider) typeDef.wrap(ret);
            } else {
                vp = (ret instanceof ValueProvider) ? (ValueProvider) ret : new JavaValueProvider(ret);
            }
            if (stem != null) {
                ret = vp.getValue(stem);
            }
        } catch (AuraRuntimeException lre) {
            throw lre;
        } catch (Exception e) {
            throw makeException(e.getMessage(), e, def);
View Full Code Here

TOP

Related Classes of org.auraframework.instance.ValueProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.