Giter Club home page Giter Club logo

Comments (5)

mhdirkse avatar mhdirkse commented on September 17, 2024

Shall we use the @EnumLabel annotation to set the captions of the Frank!Doc groups? If we do it this way, we do not have to introduce final fields within the enum type. Doing so would be more work because the wrapper API has to be extended.

from frank-doc.

mhdirkse avatar mhdirkse commented on September 17, 2024

In my proposal, the wrapper API has to be extended to give the order of the enum constants within their type. This is probably a small change.

from frank-doc.

mhdirkse avatar mhdirkse commented on September 17, 2024

I see that in the wrapper API, a FrankEnumConstant object knows its position within the enum. That is enough if we only make Frank!Doc groups for enum constants that are actually used. Do we want an empty group if there is an enum constant that is never applied?

from frank-doc.

mhdirkse avatar mhdirkse commented on September 17, 2024

The enum that holds the groups should also have an enum constant for the "Other" group, the default group for FrankElement-s. How do we document in the groups enum which enum constant is for "Other"? I see three options:

  • We introduce an annotation for enum constants that we only use on the enum constant for group "Other".
  • We give the doclet a new parameter that is set in the pom.xml of the Frank!Framework. That parameter is the enum value used for group "Other".
  • We check which enum constants are not applied in explicit @FrankDocGroup annotations. The build fails if there is no such group or if there is more than one. With a succesful build there is thus an unambiguous "Other" group.

I propose to add a new parameter to the doclet anyway - it is the class name of the enum that holds the groups.

from frank-doc.

nielsm5 avatar nielsm5 commented on September 17, 2024

Let's not overcomplicate things for now.

Right now the annotation is always used in combination with a name. That should change to an Enum.
The order will be the enum's ordinal value.

Something like:

@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface FrankDocGroup {
	FrankGroup value();

	public enum FrankGroup {
		LISTENER,
		SENDER; //etc.
	}
}

from frank-doc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.