Package kiss.model

Examples of kiss.model.Property


    protected void bind(M instance, String path) {
        Objects.requireNonNull(instance);
        Objects.requireNonNull(path);

        Model model = Model.load(instance.getClass());
        Property property = model.getProperty(path);

        if (property == null) {
            throw new IllegalArgumentException("'" + path + "' is not property for [" + model.type + "].");
        }
        form.val(model.get(instance, property));
View Full Code Here


     * @return
     */
    private static <T> T read(Model model, T java, NativeObject js) throws Exception {
        for (String name : js.keys()) {
            Object value;
            Property property = model.getProperty(name);

            if (property.isAttribute()) {
                value = transform(js.getProperty(property.name), property.model.type);
            } else {
                value = read(property.model, make(property.model.type), js.getPropertyAs(NativeObject.class, property.name));
            }

View Full Code Here

        if (output == null) {
            throw new NullPointerException();
        }

        Model model = Model.load(input.getClass());
        Property property = new Property(model, model.name);

        // traverse configuration as json
        new JSON(output).walk(model, property, input);
    }
View Full Code Here

        /**
         * {@inheritDoc}
         */
        @Override
        public void walk(Model model, Property property, Object node) {
            Property dest = this.model.getProperty(property.name);

            // never check null because PropertyWalker traverses existing properties
            this.model.set(object, dest, I.transform(node, dest.model.type));
        }
View Full Code Here

TOP

Related Classes of kiss.model.Property

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.