net.sf.jsefa.common.mapping
Class EntryPoint<T,D>

java.lang.Object
  extended by net.sf.jsefa.common.mapping.EntryPoint<T,D>
Type Parameters:
T - the type of the data type name
D - the type of the designator
Direct Known Subclasses:
RbfEntryPoint, XmlEntryPoint

public class EntryPoint<T,D>
extends Object

An entry point describes an item of the respective format that should be serialized or deserialized. An entry point is required for every type of object which will be passed to Serializer.write(java.lang.Object) or which should be returned from Deserializer.next() and only for these objects (not for the objects related to these ones).

Each entry point consists of the following parts:
1) A data type name which unambiguously maps to a TypeMapping.
2) A designator that designates the item of the respective format (e. g. the name of the xml element). 3) An optional Validator.

Instances of this class are immutable and thread-safe. This must be true for all subclasses, too.

Author:
Norman Lahme-Huetig

Constructor Summary
EntryPoint(T dataTypeName, D designator, Validator validator)
          Constructs a entry point given data type name and a designator.
 
Method Summary
 T getDataTypeName()
          Returns the data type name.
 D getDesignator()
          Returns the designator.
 Validator getValidator()
          Returns the validator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntryPoint

public EntryPoint(T dataTypeName,
                  D designator,
                  Validator validator)
Constructs a entry point given data type name and a designator.

Parameters:
dataTypeName - the data type name
designator - the designator
validator - the validator; may be null
Method Detail

getDesignator

public final D getDesignator()
Returns the designator.

Returns:
the designator

getDataTypeName

public final T getDataTypeName()
Returns the data type name.

Returns:
the data type name

getValidator

public final Validator getValidator()
Returns the validator.

Returns:
the validator or null if none exists.


Copyright © 2014. All rights reserved.