01: /*
02: * @(#) ConverterContext.java
03: *
04: * Copyright 2002 - 2003 JIDE Software. All rights reserved.
05: */
06: package com.jidesoft.converter;
07:
08: /**
09: * The context object used by ObjectConverter.
10: * For the same type, we may need different way to convert them. This context
11: * is used so that user can register different converters for the same type.
12: */
13: public class ConverterContext extends AbstractContext {
14: /**
15: * Default converter context with empty name and no user object.
16: */
17: public static ConverterContext DEFAULT_CONTEXT = new ConverterContext(
18: "");
19:
20: /**
21: * Creates a converter context with a name.
22: *
23: * @param name
24: */
25: public ConverterContext(String name) {
26: super (name);
27: }
28:
29: /**
30: * Creates a converter contex with a name and an object.
31: *
32: * @param name
33: * @param object the user object. It can be used as any object to pass informaton along.
34: */
35: public ConverterContext(String name, Object object) {
36: super(name, object);
37: }
38: }
|