Package ovh.mythmc.gestalt.features
Class GestaltFeature
java.lang.Object
ovh.mythmc.gestalt.features.GestaltFeature
A descriptor that bundles a
Feature-annotated class
with optional custom constructor parameters used during instantiation.
Use builder() to create instances via the fluent GestaltFeature.GestaltFeatureBuilder.
Pass the built instance to Gestalt.register(GestaltFeature) to
register the feature with its associated constructor parameters.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Returns a newGestaltFeature.GestaltFeatureBuilderfor creating aGestaltFeature.Returns the optional constructor parameters to use when instantiating the feature class, ornullif the feature uses a no-arg constructor.Class<?> Returns the feature class described by this descriptor.
-
Method Details
-
getFeatureClass
Returns the feature class described by this descriptor.- Returns:
- the feature class
-
getConstructorParams
Returns the optional constructor parameters to use when instantiating the feature class, ornullif the feature uses a no-arg constructor.- Returns:
- the constructor parameters, or
null
-
builder
Returns a newGestaltFeature.GestaltFeatureBuilderfor creating aGestaltFeature.- Returns:
- a new builder
-