Features System - DevNatan/inventory-framework GitHub Wiki

This documentation is in progress.

Table of Contents

Coding Conventions

Naming Rules

There are naming rules for features to make them easily identifiable, locatable and non-publicly extendable:

  • PascalCase to the name of the constant that represents the implementation instance of this feature, e.g.: MyAwesomeFeature.
  • Regarding the feature class rules:
    • Visibility must be public final;
    • Constructor must be private or package-private;
    • Cannot have any public fields unless they are effectively immutable;
    • Name must be suffixed with "Feature";
    • Be located inside the me.devnatan.inventoryframework.feature package, e.g.: "MyAwesomeFeature";
  • Implementation instance constant of this feature must be public, static and final.
public final MyAwesomeFeature implements Feature<...> {

    public static final Feature<...> MyAwesomeFeature = ...

    private MyAwesomeFeature() {}

    ...

}
⚠️ **GitHub.com Fallback** ⚠️