Class DataMapper.MapperEntry<T>

java.lang.Object
de.iip_ecosphere.platform.services.environment.DataMapper.MapperEntry<T>
Type Parameters:
T - the containing mapped type
Enclosing class:
DataMapper

private static class DataMapper.MapperEntry<T> extends Object
Implements a mapper entry for MappingConsumer.
Author:
Holger Eichelberger, SSE
  • Field Details

  • Constructor Details

    • MapperEntry

      private MapperEntry(Method getter)
      Creates a mapper entry for a given reflection getter method.
      Parameters:
      getter - the getter method
  • Method Details

    • setConsumer

      private <A> void setConsumer(Class<A> cls, Consumer<A> consumer)
      Sets a configurable consumer for a given type. Exceptions are logged.
      Type Parameters:
      A - the type
      Parameters:
      cls - the type class
      consumer - the consumer to be added
    • accept

      private boolean accept(T instance)
      Accepts an instance of the mapped type by applying the getter to instance and if the result of the invocation is not null, calls the registered translator to accept the value of the getter call. Exceptions are logged.
      Parameters:
      instance - the data instance to accept/process
      Returns:
      true if instance was passed on to a translator, false else