date subpackage

This commit is contained in:
Keith Donald
2009-06-08 04:22:10 +00:00
parent b8b84f4f39
commit 065102bca9
4 changed files with 41 additions and 5 deletions

View File

@@ -18,8 +18,8 @@ package org.springframework.ui.format;
import java.lang.annotation.Annotation;
/**
* A factory that creates Formatters to format property values on properties annotated with a particular format {@link Annotation}.
* For example, a <code>CurrencyAnnotationFormatterFactory</code> might create a {@link Formatter} that formats a <code>BigDecimal</code> value set on a property annotated with <code>@CurrencyFormat</code>.
* A factory that creates {@link Formatter formatters} to format property values on properties annotated with a particular format {@link Annotation}.
* For example, a <code>CurrencyAnnotationFormatterFactory</code> might create a <code>Formatter</code> that formats a <code>BigDecimal</code> value set on a property annotated with <code>@CurrencyFormat</code>.
* @author Keith Donald
* @param <A> The type of Annotation this factory uses to create Formatter instances
* @param <T> The type of Object Formatters created by this factory format
@@ -33,4 +33,4 @@ public interface AnnotationFormatterFactory<A extends Annotation, T> {
* @return the Formatter to use to format values of properties annotated with the annotation.
*/
Formatter<T> getFormatter(A annotation);
}
}

View File

@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.ui.format;
package org.springframework.ui.format.date;
import java.text.DateFormat;
import java.text.ParseException;
@@ -23,6 +23,7 @@ import java.util.Locale;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.ui.format.Formatter;
/**
* A formatter for {@link Date} types.