Features System - DevNatan/inventory-framework GitHub Wiki
This documentation is in progress.
- Creating a Feature
- Implementation Instance
- Coding Conventions
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
privateor 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.featurepackage, e.g.: "MyAwesomeFeature";
- Visibility must be
-
Implementation instance constant of this feature must be
public,staticandfinal.
public final MyAwesomeFeature implements Feature<...> {
public static final Feature<...> MyAwesomeFeature = ...
private MyAwesomeFeature() {}
...
}