Subject: Extending the Programming Model with @Support?


It seems @Model is more popular than @Support, only inconvenience is a naming clash with [1].

I'll bring another aspect to the table, that is prefixes like 'hide', 'disable', ... could/should be allowed for Actions. We can discuss how following domain-object examples should get interpreted by the framework. (Comments according to what I think makes most sense) ...

public class Object1 {

    @Property @Getter @Setter
    private String myProperty;
   
    // proper supporting-method naming, will get picked up by the framework and added
    // to the metamodel (no annotation required)
    public boolean hideMyProperty() {
        return false;
    }
   
}

public class Object2 {

    @Property @Getter @Setter
    private String myProperty;
   
    // allowed, nothing wrong with that, might either be picked up as an action
    // or gets ignored, depending on the framework's configuration,
    // whether the @Action annotation is mandatory or not;
    // however, this is no supporting-method!
    public boolean hideWhatever() {
        return false;
    }
   
}

public class Object3 {

    @Property @Getter @Setter
    private String myProperty;
   
    // will fail, because this method is clearly orphaned
    @Model
    public boolean hideWhatever() {
        return false;
    }
   
}

[1] https://docs.oracle.com/javaee/7/api/javax/enterprise/inject/Model.html

On 2019/09/23 05:54:52, Andi Huber <[EMAIL PROTECTED]> wrote: