Package com.asakusafw.dmdl.java.util

Examples of com.asakusafw.dmdl.java.util.JavaName


         * Invokes is~.
         * @param name the property name
         * @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;
        }
View Full Code Here


         * Invokes get~.
         * @param name the property name
         * @return the result
         */
        public Object get(String name) {
            JavaName jn = JavaName.of(new AstSimpleName(null, name));
            jn.addFirst("get");
            return invoke(jn.toMemberName());
        }
View Full Code Here

    }

    private MethodDeclaration createStringSetter(EmitContext context, PropertyDeclaration property) {
        assert context != null;
        assert property != null;
        JavaName name = JavaName.of(property.getName());
        name.addFirst("set");
        name.addLast("as");
        name.addLast("string");
        ModelFactory f = context.getModelFactory();
        SimpleName paramName = context.createVariableName(
                context.getFieldName(property).getToken());

        return f.newMethodDeclaration(
                new JavadocBuilder(f)
                    .text("{0}を設定する。",
                            context.getDescription(property))
                    .param(paramName)
                        .text("設定する値",
                                context.getDescription(property))
                    .toJavadoc(),
                new AttributeBuilder(f)
                    .annotation(
                            context.resolve(SuppressWarnings.class),
                            Models.toLiteral(f, "deprecation"))
                    .Public()
                    .toAttributes(),
                context.resolve(void.class),
                f.newSimpleName(name.toMemberName()),
                Arrays.asList(new FormalParameterDeclaration[] {
                        f.newFormalParameterDeclaration(
                                context.resolve(String.class),
                                paramName)
                }),
View Full Code Here

         * Invokes set~.
         * @param name the property name
         * @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);
        }
View Full Code Here

         * Invokes get~Option.
         * @param name the property name
         * @return the result
         */
        public ValueOption<?> getOption(String name) {
            JavaName jn = JavaName.of(new AstSimpleName(null, name));
            jn.addFirst("get");
            jn.addLast("option");
            return (ValueOption<?>) invoke(jn.toMemberName());
        }
View Full Code Here

         * Invokes set~Option.
         * @param name the property name
         * @param option the value to set
         */
        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);
        }
View Full Code Here

         * Invokes is~.
         * @param name the property name
         * @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;
        }
View Full Code Here

         * Invokes get~.
         * @param name the property name
         * @return the result
         */
        public Object get(String name) {
            JavaName jn = JavaName.of(new AstSimpleName(null, name));
            jn.addFirst("get");
            return invoke(jn.toMemberName());
        }
View Full Code Here

         * Invokes set~.
         * @param name the property name
         * @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);
        }
View Full Code Here

         * Invokes get~Option.
         * @param name the property name
         * @return the result
         */
        public ValueOption<?> getOption(String name) {
            JavaName jn = JavaName.of(new AstSimpleName(null, name));
            jn.addFirst("get");
            jn.addLast("option");
            return (ValueOption<?>) invoke(jn.toMemberName());
        }
View Full Code Here

TOP

Related Classes of com.asakusafw.dmdl.java.util.JavaName

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.