public interface PolygeneAPI
Modifier and Type | Field and Description |
---|---|
static Function<Composite,CompositeInstance> |
FUNCTION_COMPOSITE_INSTANCE_OF
Function that returns the CompositeInstance of a Composite.
|
static Function<Composite,CompositeDescriptor> |
FUNCTION_DESCRIPTOR_FOR
Function that returns the CompositeDescriptor of a Composite.
|
Modifier and Type | Method and Description |
---|---|
AssociationDescriptor |
associationDescriptorFor(AbstractAssociation association)
Returns the AssociationDescriptor of the Association.
|
CompositeDescriptor |
compositeDescriptorFor(Object compositeOrServiceReference)
Returns the CompositeDescriptor of the Composite or ServiceReference.
|
<T> T |
dereference(T composite)
If a Modifier gets a reference to the Composite using @This,
then that reference must be dereferenced using this method
before handing it out for others to use.
|
EntityDescriptor |
entityDescriptorFor(Object entity)
Returns the EntityDescriptor of the EntityComposite.
|
boolean |
isComposite(Object object)
Tests if the given object is a Composite
|
ModelDescriptor |
modelDescriptorFor(Object compositeOrServiceReference)
Returns the ModelDescriptor of the Composite or ServiceReference.
|
ModuleDescriptor |
moduleOf(Object compositeOrServiceReferenceOrUow)
Returns the Module where the Composite, ServiceReference or UnitOfWork belongs.
|
PropertyDescriptor |
propertyDescriptorFor(Property<?> property)
Returns the PropertyDescriptor of the Property.
|
ServiceDescriptor |
serviceDescriptorFor(Object service)
Returns the ServiceDescriptor of the ServiceComposite.
|
TransientDescriptor |
transientDescriptorFor(Object transsient)
Returns the TransientDescriptor of the TransientComposite.
|
ValueDescriptor |
valueDescriptorFor(Object value)
Returns the ValueDescriptor of the ValueComposite.
|
static final Function<Composite,CompositeInstance> FUNCTION_COMPOSITE_INSTANCE_OF
static final Function<Composite,CompositeDescriptor> FUNCTION_DESCRIPTOR_FOR
<T> T dereference(T composite)
T
- Parameterized type of the Compositecomposite
- instance reference injected in Modified using @ThisModuleDescriptor moduleOf(Object compositeOrServiceReferenceOrUow)
compositeOrServiceReferenceOrUow
- The Composite (Service, Value, Entity or Transient) or ServiceReference
or UnitOfWork to lookup the Module it belongs toModelDescriptor modelDescriptorFor(Object compositeOrServiceReference)
compositeOrServiceReference
- The Composite (Service, Value, Entity or Transient) of ServiceReference
for which to lookup the ModelDescriptorCompositeDescriptor compositeDescriptorFor(Object compositeOrServiceReference)
compositeOrServiceReference
- The Composite (Service, Value, Entity or Transient) or ServiceReference
for which to lookup the CompositeDescriptorTransientDescriptor transientDescriptorFor(Object transsient)
transsient
- The TransientComposite for which to lookup the TransientDescriptorEntityDescriptor entityDescriptorFor(Object entity)
entity
- The EntityComposite for which to lookup the EntityDescriptorValueDescriptor valueDescriptorFor(Object value)
value
- The ValueComposite for which to lookup the ValueDescriptorServiceDescriptor serviceDescriptorFor(Object service)
service
- The ServiceComposite for which to lookup the ServiceDescriptorPropertyDescriptor propertyDescriptorFor(Property<?> property)
property
- The Property for which to lookup the PropertyDescriptorAssociationDescriptor associationDescriptorFor(AbstractAssociation association)
association
- The Association for which to lookup the AssociationDescriptorboolean isComposite(Object object)
object
- The Java object to be checked