Package com.asakusafw.utils.java.model.syntax

Examples of com.asakusafw.utils.java.model.syntax.Type


    }

    private MethodDeclaration createValueSetter(PropertyDeclaration property) {
        assert property != null;
        SimpleName paramName = context.createVariableName("value");
        Type valueType = context.getValueType(property);
        return f.newMethodDeclaration(
                new JavadocBuilder(f)
                    .text("{0}を設定する。",
                            context.getDescription(property))
                    .param(paramName)
View Full Code Here


    }

    private MethodDeclaration createOptionSetter(PropertyDeclaration property) {
        assert property != null;
        SimpleName paramName = context.createVariableName("option");
        Type optionType = context.getFieldType(property);
        return f.newMethodDeclaration(
                new JavadocBuilder(f)
                    .text("{0}を設定する。",
                            context.getDescription(property))
                    .param(paramName)
View Full Code Here

    private Expression newInstance(
            ImportBuilder importer,
            Class<?> klass,
            Expression... arguments) {
        Type type = Models.toType(f, klass);
        if (importer != null) {
            type = importer.resolve(type);
        }
        return types(type).newObject(arguments).toExpression();
    }
View Full Code Here

        }

        private Type t(java.lang.reflect.Type type, Type...typeArgs) {
            assert type != null;
            assert typeArgs != null;
            Type raw = importer.toType(type);
            if (typeArgs.length == 0) {
                return raw;
            }
            return factory.newParameterizedType(raw, Arrays.asList(typeArgs));
        }
View Full Code Here

            AstLiteral deleteFlagValue) {
        assert context != null;
        assert model != null;
        assert deleteFlagValue != null;
        ModelFactory f = context.getModelFactory();
        Type type;
        Expression value;
        switch (deleteFlagValue.kind) {
        case BOOLEAN:
            type = context.resolve(boolean.class);
            value = Models.toLiteral(f, deleteFlagValue.toBooleanValue());
View Full Code Here

    }

    private Type type(
            java.lang.reflect.Type type,
            java.lang.reflect.Type... arguments) {
        Type result = Models.toType(f, type);
        if (arguments.length != 0) {
            List<Type> args = new ArrayList<Type>();
            for (java.lang.reflect.Type t : arguments) {
                args.add(Models.toType(f, t));
            }
View Full Code Here

    }

    private Type type(
            String name,
            String... arguments) {
        Type result = f.newNamedType(Models.toName(f, name));
        if (arguments.length != 0) {
            List<Type> args = new ArrayList<Type>();
            for (String t : arguments) {
                args.add(f.newNamedType(Models.toName(f, t)));
            }
View Full Code Here

TOP

Related Classes of com.asakusafw.utils.java.model.syntax.Type

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.