KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > sapia > regis > type > BuiltinType


1 package org.sapia.regis.type;
2
3 import org.sapia.regis.Node;
4
5 /**
6  * This interface specifies the behavior of "builtin" data types.
7  *
8  * @see org.sapia.regis.type.BuiltinTypes
9  *
10  * @author yduchesne
11  *
12  */

13 public interface BuiltinType {
14   
15   /**
16    * @return the name of this type.
17    */

18   public String JavaDoc getName();
19   
20   /**
21    * @param value a <code>String</code> value
22    * @return the <code>Object</code> value that could be parsed from the given string.
23    */

24   public Object JavaDoc parse(String JavaDoc value);
25   
26   /**
27    * @param value an <code>Object</code> value
28    * @return the <code>String</code> representation for the given string.
29    */

30   public String JavaDoc toString(Object JavaDoc value);
31   
32   /**
33    * @param value an <code>Object</code>
34    * @return <code>true</code> if the given object's type corresponds to this type.
35    */

36   public boolean isAssignable(Object JavaDoc value);
37
38   /**
39    * @param value an <code>Object</code>
40    * @return <code>true</code> if the given class corresponds to this type.
41    */

42   public boolean isAssignable(Class JavaDoc clazz);
43   
44   /**
45    * @param propName the name of the property whose value should be returned.
46    * @param node a <code>Node</code>.
47    * @return the <code>Object</code> corresponding to the value of the required property.
48    */

49   public Object JavaDoc getProperty(String JavaDoc propName, Node node);
50
51 }
52
Popular Tags