Code Monkey home page Code Monkey logo

katana-old's People

Contributors

ascopes avatar

Watchers

 avatar

katana-old's Issues

Spike - Removing inherited values

When processing an annotation mirror, it appears that annotation attributes left as default values and unspecified explicitly do not appear in the mirror of that annotation.

Investigate whether I could use this as the mechanism for default values.

If this works:

  • I can replace Toggle with a boolean.
  • Default attributes can replace the DefaultValue annotation (leaving just ImmutableDefaultValue and MutableDefaultValue).
  • We no longer will need INHERITED in enums.

Consider converting to explicit modules

Remove use of automatic modules and use explicit module declarations instead.

This may require baselining at Java 9, 10, or 11 instead of 8.

This will also require #17 to be able to be tested properly, I guess.

Feature: @Settings annotation aliases

I want to be able to define a custom annotation that is annotated with Settings and allow it to be detected from the alias.

This will allow me to enforce standard settings on projects that share a common library without redefining my desired settings per project.

E.g.

@Settings(
    className="*Impl",
    packageName="*"
)
@Documented
@Target({TYPE, PACKAGE})
public @interface UseCommonKatanaSettings {
}

I may want to be able to specify defaults for mutable and immutable types separately. This could be achieved using something similar to:

@ImmutableModel(
    @Settings(
        className="*Impl",
        packageName="*"
    )
)
@Documented
@Target({TYPE, PACKAGE})
public @interface UseCommonKatanaSettings {
}

Feature: improve model-specific settings

I propose to disallow the use of ImmutableModel and MutableModel on packages and to remove the Settings within that annotation.

Instead, I propose to make Settings repeatable, and to add a member "target" to define whether to apply to a Mutable or Immutable model or both.

E.g.

@Settings(
    target=ImmutableModel.class,
    className="Frozen*"
)
@Settings(
    target=MutableModel.class
    className="Mutable*"
)
package my.company.models;

The "target" member would then be defined as follows:

Class<? extends Annotation>[] target()
    default { ImmutableModel.class, MutableModel.class }

The settings annotation itself would be updated to have the @Repeatable(SettingsList.class) and a new annotation would also be defined:

@Retention(SOURCE)
@Target({PACKAGE, TYPE})
public @interface SettingsList {
    Settings[] value();
}

The SettingsResolver would need updating to accommodate for this type.

This would likely change the solution to #4 slightly.

CI: Checkerframework integration

Integrate checkerframework annotation processor.

Required dependencies:

      <dependency>
        <!-- Checkerframework annotation processor. -->
        <groupId>org.checkerframework</groupId>
        <artifactId>checker</artifactId>
        <version>3.19.0</version>
        <scope>provided</scope>
      </dependency>

      <dependency>
        <!-- Checkerframework JDK 8 support. -->
        <groupId>org.checkerframework</groupId>
        <artifactId>jdk8</artifactId>
        <version>3.19.0</version>
        <scope>provided</scope>
      </dependency>

Will need to move the META-INF/*Processor file into gen and get build-helper-plugin to move it once compilation has completed so that we can re-enable annotation processing on the katana-annotation-processor module again...

Feature: Comparable integration

I want to be able to use annotations similar to ones like @Equality.Include which, when used, will allow the generated class to implement Comparable.

This should also be applied if the interface extends comparable and does not provide a default implementation for compareTo.

When implicitly including all attributes, only those that implement comparable internally, or are primitive, should be considered.

The include annotation may want to allow the specification of either an int-returning binary operator, or a method that returns the corresponding comparator.

If it does not implement Comparable on an interface level, it should allow the use of an annotation such as @Comparison.Custom to allow specifying a custom static compareTo method (with signature static int compare(T t1, T t2), OR to annotate a static comparator field, OR to annotate a custom static comparator-returning method with signature static Comparator<T> comparator();

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.