Package com.codereligion.hammock.compiler.model.simple

Examples of com.codereligion.hammock.compiler.model.simple.StringName


        final LoadingCache<TypeElement, Type> cache = CacheBuilder.newBuilder().build(new CacheLoader<TypeElement, Type>() {

            @Override
            public Type load(TypeElement typeElement) throws Exception {
                return new SimpleType(new StringName(typeElement.getQualifiedName() + "_"));
            }

        });

        for (TypeElement annotation : annotations) {
View Full Code Here


    private void parse(ExecutableElement method, Type type) {
        final TypeElement typeElement = (TypeElement) method.getEnclosingElement();

        final Functional functional = method.getAnnotation(Functional.class);
        final ClosureName name = new StringClosureName(method.getSimpleName().toString());
        final Name parameterType = new StringName(typeElement.getQualifiedName().toString());

        final Closure closure;
        if (method.getReturnType().getKind() == TypeKind.BOOLEAN) {
            closure = new BaseClosure(name, parameterType, functional.nullsafe());
        } else {
            final Name returnType = new StringName(method.getReturnType().toString());
            closure = new BaseClosure(name, parameterType, returnType, functional.nullsafe());
        }

        type.getClosures().add(closure);
    }
View Full Code Here

TOP

Related Classes of com.codereligion.hammock.compiler.model.simple.StringName

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.