com.iparelan.util
Interface UnmarshallingStrategy<T>

Type Parameters:
T - The type of the value to be unmarshalled.
All Known Implementing Classes:
FileUnmarshallingStrategy, IntegerUnmarshallingStrategy

@Copyright(value="Copyright © 2008, Iparelan Solutions, LLC. All rights reserved.")
public interface UnmarshallingStrategy<T>

A strategy for parsing a value that is stored as a String.

Version:
July 2008
Author:
Greg Mattes

Field Summary
static UnmarshallingStrategy<File> FILE
           
static UnmarshallingStrategy<Integer> INTEGER
           
 
Method Summary
 T unmarshall(String marshalled)
          Parses the specified String as value of type T and produces the resultant object.
 

Field Detail

FILE

static final UnmarshallingStrategy<File> FILE

INTEGER

static final UnmarshallingStrategy<Integer> INTEGER
Method Detail

unmarshall

@Nullable
T unmarshall(@Nullable
                      String marshalled)
Parses the specified String as value of type T and produces the resultant object.

Parameters:
marshalled - The value to be unmarshalled from a String to a T. May be null, in which case null is produced.
Returns:
The unmarshalled value of marshalled. null is considered to be the unmarshalled value of null.
Throws:
RuntimeException - Iff marshalled cannot be unmarshalled. The particular type of exception depends on the context in which this method is defined.


Copyright © 2008 Iparelan Solutions, LLC. All rights reserved.