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

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


     * @return related meta-data
     * @throws IllegalArgumentException if some parameters were {@code null}
     */
    public Expression toMetaData(OperatorPortDeclaration var, int position) {
        Precondition.checkMustNotBeNull(var, "var"); //$NON-NLS-1$
        NamedType type;
        TypeMirror representation = var.getType().getRepresentation();
        List<AnnotationElement> members = Lists.create();
        members.add(factory.newAnnotationElement(
                factory.newSimpleName("name"),
                Models.toLiteral(factory, var.getName())));
View Full Code Here


        List<TypeBodyDeclaration> results = Lists.create();

        TypeDeclaration objectClass = createObjectClass();
        results.add(objectClass);

        NamedType objectType = (NamedType) importer.resolvePackageMember(
                Models.append(factory,
                        getClassName(),
                        objectClass.getName()));
        MethodDeclaration factoryMethod = createFactoryMethod(objectType);
        if (factoryMethod != null) {
View Full Code Here

        return results;
    }

    private TypeDeclaration createObjectClass() {
        SimpleName name = getObjectClassName();
        NamedType objectType = (NamedType) importer.resolvePackageMember(
                Models.append(factory, getClassName(), name));
        List<TypeBodyDeclaration> members = createObjectMembers(objectType);
        return factory.newClassDeclaration(
                new JavadocBuilder(factory)
                    .inline(flowClass.getDocumentation())
View Full Code Here

            Context context,
            OperatorMethodDescriptor descriptor) {
        assert context != null;
        assert descriptor != null;
        SimpleName name = getObjectClassName(context.element);
        NamedType objectType = (NamedType) importer.resolvePackageMember(
                Models.append(factory, getClassName(), name));
        List<TypeParameterDeclaration> typeParameters = util.toTypeParameters(context.element);
        List<TypeBodyDeclaration> members = createObjectMembers(
                context,
                descriptor,
View Full Code Here

            throw new IllegalArgumentException("typeVariable must not be null"); //$NON-NLS-1$
        }
        if (typeVariable.getModelKind() != ModelKind.NAMED_TYPE) {
            throw new IllegalArgumentException("typeVariable must be a simple name-type");
        }
        NamedType named = (NamedType) typeVariable;
        if (named.getModelKind() != ModelKind.SIMPLE_NAME) {
            throw new IllegalArgumentException("typeVariable must have a simple name");
        }

        return typeParam((SimpleName) named.getName());
    }
View Full Code Here

     */
    public Type convert(DeclaredType type) {
        if (type == null) {
            throw new IllegalArgumentException("type must not be null"); //$NON-NLS-1$
        }
        NamedType raw = convertToRawType(type);
        if (raw == null) {
            return null;
        }
        List<? extends TypeMirror> typeArguments = type.getTypeArguments();
        if (typeArguments.isEmpty()) {
View Full Code Here

TOP

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

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.