Skip to content

Recipe to move fields to the top of class definition #721

@greg-at-moderne

Description

@greg-at-moderne

What problem are you trying to solve?

Increase readability. Follow conventions.

Describe the situation before applying the recipe

class A {
    void foo(String bar) {
        int i = Integer.valueOf(bar);
    }

    String myField = "important";
}

Describe the situation after applying the recipe

class A {
    String myField = "important";

    void foo(String bar) {
        int i = Integer.valueOf(bar);
    }
}

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions