public interface PropertyFactory
extends sirius.kernel.di.std.Priorized
Property for a given Field.
When scanning a class to compute its EntityDescriptor, for each field each
PropertyFactory is queried. The first to return true as result of
accepts(EntityDescriptor, Field) will be used to compute the property for a field by calling
create(EntityDescriptor, AccessPath, Field, Consumer).
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(EntityDescriptor descriptor,
Field field)
Determines if the given field is handled by this property factory.
|
void |
create(EntityDescriptor descriptor,
AccessPath accessPath,
Field field,
Consumer<Property> propertyConsumer)
Computes a
Property for the given field. |
default int |
getPriority() |
default int getPriority()
getPriority in interface sirius.kernel.di.std.Priorizedboolean accepts(EntityDescriptor descriptor, @Nonnull Field field)
descriptor - the current descriptorfield - the field to create a property fromvoid create(@Nonnull EntityDescriptor descriptor, @Nonnull AccessPath accessPath, @Nonnull Field field, @Nonnull Consumer<Property> propertyConsumer)
Property for the given field.descriptor - the descriptor to which the property will belongaccessPath - the accesspath used to reach the given propertyfield - the field to create a property frompropertyConsumer - the consumer which is used to process created propertiesCopyright © 2018. All rights reserved.