StandardDispatcher should have a Controller Level isStatic Property #97

Open
opened 2020-06-04 05:24:27 +01:00 by Ghost · 0 comments
Ghost commented 2020-06-04 05:24:27 +01:00 (Migrated from codeberg.org)

Feature Request

Sub-Project

  • core

Description

It should be possible to define the isStatic property globally across a module rather than having to do StandardCommand#isStatic.

Motivation

Some developers prefer to keep commands to single words, or have a specific module where they want all commands to be static. This just keeps things cleaner for those cases.

Interface

@StandardController(isStatic = true)
public class MyController implements Controller {

    @StandardCommand("ping") // StandardCommand#isStatic is implied as true
    public String ping() {
        return "pong!";
    } 
}
# Feature Request <!-- If you feel a heading is irrelevant, just leave it empty or remove it. --> ## Sub-Project <!-- Can you specify which sub-project(s) this is relevant to? If you aren't sure, or this is a proposal for a new sub-project, you can delete this. --> * core ## Description <!-- Explain what this is about, try to use full sentences, and make your point clear. --> It should be possible to define the `isStatic` property globally across a module rather than having to do `StandardCommand#isStatic`. ## Motivation <!-- Why is this a feature that should be implemented in Commandler rather than in your own project using it? What makes this fundamental, or reusable, or of demand to other developers? --> Some developers prefer to keep commands to single words, or have a specific module where they want all commands to be static. This just keeps things cleaner for those cases. ## Interface <!-- In some cases you may wish to propose an interface or method names to help describe how you'd want to use this, or for others to discuss and improve ahead of time before final implementation. --> ```java @StandardController(isStatic = true) public class MyController implements Controller { @StandardCommand("ping") // StandardCommand#isStatic is implied as true public String ping() { return "pong!"; } } ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
SethFalco/commandler#97
No description provided.