Examples of ClosureName


Examples of com.codereligion.hammock.compiler.model.ClosureName

    @Override
    public void parse(Element element, Function<TypeElement, Type> storage) {
        final ExecutableElement method = (ExecutableElement) element;
        final TypeElement typeElement = (TypeElement) method.getEnclosingElement();
        final FirstClass annotation = method.getAnnotation(FirstClass.class);
        final ClosureName delegate = new ClosureName(method.getSimpleName().toString());;

        final ClosureName name;
       
        if (annotation.value().isEmpty()) {
            name = delegate;
        } else {
            name = new ClosureName(annotation.value());
        }
       
        final boolean isStatic = method.getModifiers().contains(Modifier.STATIC);

        final Name parameterType;
View Full Code Here

Examples of com.codereligion.hammock.compiler.model.ClosureName

    @Override
    public void parse(Element element, Function<TypeElement, Type> storage) {
        final ExecutableElement method = (ExecutableElement) element;
        final TypeElement typeElement = (TypeElement) method.getEnclosingElement();
        final FirstClass annotation = method.getAnnotation(FirstClass.class);
        final ClosureName delegate = new ClosureName(method.getSimpleName().toString());;

        final ClosureName name;
       
        if (annotation.name().isEmpty()) {
            name = delegate;
        } else {
            name = new ClosureName(annotation.name());
        }

        final List<? extends VariableElement> parameters = method.getParameters();
        final boolean isStatic = method.getModifiers().contains(Modifier.STATIC);
View Full Code Here

Examples of com.codereligion.hammock.compiler.model.ClosureName

        final TypeElement typeElement = (TypeElement) element.getEnclosingElement();
        final ExecutableElement method = (ExecutableElement) element;
        final Functor annotation = method.getAnnotation(Functor.class);

        final String defaultName = method.getSimpleName().toString();
        final ClosureName delegate = new ClosureName(defaultName);
        final ClosureName name = new ClosureName(annotation.name().isEmpty() ? defaultName : annotation.name());

        final List<? extends VariableElement> parameters = method.getParameters();
        final boolean isStatic = method.getModifiers().contains(Modifier.STATIC);

        final Argument input;
View Full Code Here

Examples of com.codereligion.hammock.compiler.model.ClosureName

    @Override
    public void parse(Element element, Function<TypeElement, Type> storage) {
        final ExecutableElement method = (ExecutableElement) element;
        final TypeElement typeElement = (TypeElement) method.getEnclosingElement();
        final Functor annotation = method.getAnnotation(Functor.class);
        final ClosureName delegate = new ClosureName(method.getSimpleName().toString());;

        final ClosureName name;
       
        if (annotation.name().isEmpty()) {
            name = delegate;
        } else {
            name = new ClosureName(annotation.name());
        }

        final List<? extends VariableElement> parameters = method.getParameters();
        final boolean isStatic = method.getModifiers().contains(Modifier.STATIC);
View Full Code Here

Examples of com.codereligion.hammock.compiler.model.ClosureName

    @Override
    public void parse(Element element, Function<TypeElement, Type> storage) {
        final ExecutableElement method = (ExecutableElement) element;
        final TypeElement typeElement = (TypeElement) method.getEnclosingElement();
        final Functor annotation = method.getAnnotation(Functor.class);
        final ClosureName delegate = new ClosureName(method.getSimpleName().toString());;

        final ClosureName name;
       
        if (annotation.name().isEmpty()) {
            name = delegate;
        } else {
            name = new ClosureName(annotation.name());
        }

        final List<? extends VariableElement> parameters = method.getParameters();
        final boolean isStatic = method.getModifiers().contains(Modifier.STATIC);
View Full Code Here

Examples of com.codereligion.hammock.compiler.model.ClosureName

    @Override
    public void parse(Element element, Function<TypeElement, Type> storage) {
        final ExecutableElement method = (ExecutableElement) element;
        final TypeElement typeElement = (TypeElement) method.getEnclosingElement();
        final FirstClass annotation = method.getAnnotation(FirstClass.class);
        final ClosureName delegate = new ClosureName(method.getSimpleName().toString());;

        final ClosureName name;
       
        if (annotation.name().isEmpty()) {
            name = delegate;
        } else {
            name = new ClosureName(annotation.name());
        }
       
        final boolean isStatic = method.getModifiers().contains(Modifier.STATIC);

        final Name parameterType;
View Full Code Here

Examples of com.codereligion.hammock.compiler.model.ClosureName

        final Functor annotation = method.getAnnotation(Functor.class);
        final Configuration config = annotation == null ? parent : new Configuration(annotation).merge(parent);

        final String defaultName = method.getSimpleName().toString();
        final ClosureName delegate = new ClosureName(defaultName);
        final ClosureName name = new ClosureName(config.getName().or(defaultName));

        final List<? extends VariableElement> parameters = method.getParameters();
        final boolean isStatic = method.getModifiers().contains(Modifier.STATIC);

        final Argument input;
View Full Code Here

Examples of com.codereligion.hammock.compiler.model.api.ClosureName

    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());
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.