Package com.asakusafw.dmdl.java.util

Examples of com.asakusafw.dmdl.java.util.JavaName.toMemberName()


         * @return the result
         */
        public Object get(String name) {
            JavaName jn = JavaName.of(new AstSimpleName(null, name));
            jn.addFirst("get");
            return invoke(jn.toMemberName());
        }

        /**
         * Invokes set~.
         * @param name the property name
View Full Code Here


         * @param value the value to set
         */
        public void set(String name, Object value) {
            JavaName jn = JavaName.of(new AstSimpleName(null, name));
            jn.addFirst("set");
            invoke(jn.toMemberName(), value);
        }

        /**
         * Invokes get~Option.
         * @param name the property name
View Full Code Here

         */
        public ValueOption<?> getOption(String name) {
            JavaName jn = JavaName.of(new AstSimpleName(null, name));
            jn.addFirst("get");
            jn.addLast("option");
            return (ValueOption<?>) invoke(jn.toMemberName());
        }

        /**
         * Invokes set~Option.
         * @param name the property name
View Full Code Here

         */
        public void setOption(String name, ValueOption<?> option) {
            JavaName jn = JavaName.of(new AstSimpleName(null, name));
            jn.addFirst("set");
            jn.addLast("option");
            invoke(jn.toMemberName(), option);
        }

        /**
         * Invokes reset().
         */
 
View Full Code Here

         */
        public void setOption(String name, ValueOption<?> option) {
            JavaName jn = JavaName.of(new AstSimpleName(null, name));
            jn.addFirst("set");
            jn.addLast("option");
            invoke(jn.toMemberName(), option);
        }

        /**
         * Invokes reset().
         */
 
View Full Code Here

        if (isBoolean(property)) {
            name.addFirst("is"); //$NON-NLS-1$
        } else {
            name.addFirst("get"); //$NON-NLS-1$
        }
        return factory.newSimpleName(name.toMemberName());
    }

    private boolean isBoolean(PropertyDeclaration property) {
        assert property != null;
        if ((property.getType() instanceof BasicType) == false) {
View Full Code Here

        if (property == null) {
            throw new IllegalArgumentException("property must not be null"); //$NON-NLS-1$
        }
        JavaName name = JavaName.of(property.getName());
        name.addFirst("set"); //$NON-NLS-1$
        return factory.newSimpleName(name.toMemberName());
    }

    /**
     * Returns the corresponded option getter name.
     * @param property target property
View Full Code Here

            throw new IllegalArgumentException("property must not be null"); //$NON-NLS-1$
        }
        JavaName name = JavaName.of(property.getName());
        name.addFirst("get"); //$NON-NLS-1$
        name.addLast("Option"); //$NON-NLS-1$
        return factory.newSimpleName(name.toMemberName());
    }

    /**
     * Returns the corresponded option setter name.
     * @param property target property
View Full Code Here

            throw new IllegalArgumentException("property must not be null"); //$NON-NLS-1$
        }
        JavaName name = JavaName.of(property.getName());
        name.addFirst("set"); //$NON-NLS-1$
        name.addLast("Option"); //$NON-NLS-1$
        return factory.newSimpleName(name.toMemberName());
    }

    /**
     * Returns a variable name which is different to other property names.
     * @param hint the naming hint
View Full Code Here

         * @return the result
         */
        public boolean is(String name) {
            JavaName jn = JavaName.of(new AstSimpleName(null, name));
            jn.addFirst("is");
            Object result = invoke(jn.toMemberName());
            return (Boolean) result;
        }

        /**
         * Invokes get~.
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.