com.jstatcom.model
Class JSCTypeDef

java.lang.Object
  extended by com.jstatcom.model.JSCTypeDef

public final class JSCTypeDef
extends java.lang.Object

Defines a type to be used with a symbol table. A type definition contains a name, a data type and a description.

Author:
Markus Kraetzig

Field Summary
 java.lang.String description
           
 java.lang.String name
           
 JSCTypes type
           
 
Constructor Summary
JSCTypeDef(java.lang.String name, JSCTypes type)
          Creates a type definition with a name, a type and no description.
JSCTypeDef(java.lang.String name, JSCTypes type, java.lang.String description)
          Creates a type definition with a name, a type and an optional description.
 
Method Summary
 JSCData getInstance()
          Gets an empty instance of this typedef with the same name.
 java.lang.String toString()
          Gets string representation of this object.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

public final java.lang.String name

type

public final JSCTypes type

description

public final java.lang.String description
Constructor Detail

JSCTypeDef

public JSCTypeDef(java.lang.String name,
                  JSCTypes type,
                  java.lang.String description)
Creates a type definition with a name, a type and an optional description.

Parameters:
name - the name of this type
type - the data type
description - a description of the data that is stored under this type
Throws:
java.lang.IllegalArgumentException - if (type == null) or if name is not valid or if description contains / * or * /
See Also:
JSCConstants.isValidName(java.lang.String)

JSCTypeDef

public JSCTypeDef(java.lang.String name,
                  JSCTypes type)
Creates a type definition with a name, a type and no description.

Parameters:
name - the name of this type
type - the data type
Throws:
java.lang.IllegalArgumentException - if (type == null) or if name is not valid
See Also:
JSCConstants.isValidName(java.lang.String)
Method Detail

toString

public final java.lang.String toString()
Gets string representation of this object.

Overrides:
toString in class java.lang.Object
Returns:
a string

getInstance

public JSCData getInstance()
Gets an empty instance of this typedef with the same name.

Returns:
empty JSCData object of type