com.jstatcom.model
Class JSCTypeDef
- java.lang.Object
-
- com.jstatcom.model.JSCTypeDef
-
public final class JSCTypeDef extends java.lang.ObjectDefines a type to be used with a symbol table. A type definition contains a name, a data type and a description.
-
-
Field Summary
Fields Modifier and Type Field and Description java.lang.Stringdescriptionjava.lang.StringnameJSCTypestype
-
Constructor Summary
Constructors Constructor and Description 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
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description JSCDatagetInstance()Gets an empty instance of this typedef with the same name.java.lang.StringtoString()Gets string representation of this object.
-
-
-
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 typetype- the data typedescription- a description of the data that is stored under this type- Throws:
java.lang.IllegalArgumentException-if (type == null)or ifnameis 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 typetype- the data type- Throws:
java.lang.IllegalArgumentException-if (type == null)or ifnameis 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:
toStringin classjava.lang.Object- Returns:
- a string
-
getInstance
public JSCData getInstance()
Gets an empty instance of this typedef with the same name.- Returns:
- empty
JSCDataobject oftype
-
-
DMelt 3.0 © DataMelt by jWork.ORG