com.kuka.roboticsAPI.controllerModel.mapping
Class AbstractMapper<T extends MappingToken<?>>

java.lang.Object
  extended by com.kuka.roboticsAPI.controllerModel.mapping.AbstractMapper<T>
Type Parameters:
T - The mapping token type on which the mapper works.
Direct Known Subclasses:
SunriseMapper

public abstract class AbstractMapper<T extends MappingToken<?>>
extends Object

Base class for all mappers for commands targeting a Sunrise controller.

This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

Constructor Summary
AbstractMapper()
           
 
Method Summary
protected  void beforeMap(T info)
          Will be called immediately before mapping.
protected  AbstractMapperTable<T> getMapperTable()
          Gets the MapperTable in which this mapper is registered.
abstract  Collection<Class<?>> getMappingTypes()
          Gets the mapping types which this mapper can map.
protected abstract  void map(T info)
          This method is called when the mapper should map a command for which it is registered.
 void performMapping(T info)
          Performs the mapping.
 void register(AbstractMapperTable<T> table)
          Registers the current mapper to participate in a mapping process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMapper

public AbstractMapper()
Method Detail

getMapperTable

protected AbstractMapperTable<T> getMapperTable()
Gets the MapperTable in which this mapper is registered.

Returns:
The MapperTable in which this mapper is registered.

performMapping

public final void performMapping(T info)
Performs the mapping. It ensures, that beforeMap() gets called before calling the map() method, which performs the actual mapping.

Parameters:
info - The mapping information for the current mapping process.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

beforeMap

protected void beforeMap(T info)
Will be called immediately before mapping.

Parameters:
info - The mapping information for the current mapping process.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

map

protected abstract void map(T info)
This method is called when the mapper should map a command for which it is registered. It is to be overridden by the descendant mappers.

Parameters:
info - The mapping information for the current mapping process.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

getMappingTypes

public abstract Collection<Class<?>> getMappingTypes()
Gets the mapping types which this mapper can map. A type can be a command or a part of a command, depending on what the mapper is able to do. For example, the type could be an IAction, an IControllerCommand or an IStopCondition.

Returns:
The mapping types which this mapper can map. null is not allowed.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.

register

public final void register(AbstractMapperTable<T> table)
Registers the current mapper to participate in a mapping process.

This method must be called manually if the mapper was not added to a Sunrise controller through the config file.

Parameters:
table - The table in which the mapper should be registered. null is not allowed.
This element is an undocumented internal feature. It is not intended to be used by applications as it might change or be removed in future versions.


Copyright © 2019. All rights reserved.