Examples of NamedType


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

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

        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

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

        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

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

            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

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

            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

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

     */
    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

Examples of com.facebook.presto.hive.shaded.org.codehaus.jackson.map.jsontype.NamedType

    @Override
    public void registerSubtypes(Class<?>... classes)
    {
        NamedType[] types = new NamedType[classes.length];
        for (int i = 0, len = classes.length; i < len; ++i) {
            types[i] = new NamedType(classes[i]);
        }
        registerSubtypes(types);
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.jsontype.NamedType

        JsonSubTypes t = a.getAnnotation(JsonSubTypes.class);
        if (t == null) return null;
        JsonSubTypes.Type[] types = t.value();
        ArrayList<NamedType> result = new ArrayList<NamedType>(types.length);
        for (JsonSubTypes.Type type : types) {
            result.add(new NamedType(type.value(), type.name()));
        }
        return result;
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.jsontype.NamedType

    @Override
    public void registerSubtypes(Class<?>... classes)
    {
        NamedType[] types = new NamedType[classes.length];
        for (int i = 0, len = classes.length; i < len; ++i) {
            types[i] = new NamedType(classes[i]);
        }
        registerSubtypes(types);
    }
View Full Code Here

Examples of com.facebook.presto.jdbc.internal.jackson.databind.jsontype.NamedType

                AnnotatedClass ac = AnnotatedClass.constructWithoutSuperTypes(nt.getType(), ai, config);
                _collectAndResolve(ac, nt, config, ai, collected);
            }           
        }
       
        NamedType rootType = new NamedType(rawBase, null);
        AnnotatedClass ac = AnnotatedClass.constructWithoutSuperTypes(rawBase, ai, config);
           
        // and finally subtypes via annotations from base type (recursively)
        _collectAndResolve(ac, rootType, config, ai, collected);
        return new ArrayList<NamedType>(collected.values());
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.