1 package com.loribel.commons.abstraction; 2 3 import com.loribel.commons.exception.*; 4 5 /*** 6 * Abstration of StringConvertors. 7 */ 8 public interface GB_StringConvertorsI 9 { 10 /*** 11 * Parses String to produce corresponding object. 12 * 13 * @param a_string String - string to cast to Object 14 * @param a_type Class - type to use 15 * 16 * @return Object 17 */ 18 Object stringAsValue( 19 String a_string, 20 Class a_type) 21 throws GB_ConvertorException; 22 23 /*** 24 * Formats object into <tt>String</tt>. 25 * 26 * @param a_value Object - value to produce String 27 * @param a_type Class - type to use 28 * 29 * @return String 30 */ 31 String valueAsString( 32 Object a_value, 33 Class a_type) 34 throws GB_ConvertorException; 35 }