New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@Getter annotation on a class should support onMethod #1653

Closed
danieltaub96 opened this Issue Apr 11, 2018 · 4 comments

Comments

Projects
None yet
4 participants
@danieltaub96
Contributor

danieltaub96 commented Apr 11, 2018

Hello, i'm a huge fan of lombok project,

i wondered why the functionality of onMethod are not supported on class,

as mentioned in the official doc :
"The onX parameter is not legal on any type-wide variant. For example, a @getter annotation on a class does not support onMethod"

I thinking this should be supported, for example i'm using graphql for java, and I need to put on each getter the annotation @Graphqlfield

public class Example {
    private String a;
    private Integer b;

    @GraphQLField
    public String getA() {
        return a;
    }

    @GraphQLField
    public Integer getB() {
        return b;
    }
}

Think on a class that haves a lot of getters, this all could be replaced like that

@Getter(onMethod = @__({@GraphQLField}))
public class Example {
    private String a;
    private Integer b;
}

thanks.

@rzwitserloot

This comment has been minimized.

Owner

rzwitserloot commented Apr 17, 2018

@rspilker is working on this now.

@rspilker

This comment has been minimized.

Collaborator

rspilker commented Apr 23, 2018

Is part of the latest edge release.

@rspilker rspilker closed this Apr 23, 2018

@victorwss

This comment has been minimized.

Contributor

victorwss commented Apr 23, 2018

@rspilker You documented it as for @Getter and @Setter. Is it for @Wither also?

@rspilker

This comment has been minimized.

Collaborator

rspilker commented Apr 24, 2018

Not yet. We didn't forget about that, but wanted to release it for @Getter and @Setter first, also because we have some more plans for @Wither.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment