|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.dse.base.FormatElement
com.ibm.dse.base.ConstantFormat
This class returns a constant value when it is formatted, and extracts the same constant value when it is unformatted.
Field Summary | |
---|---|
(package private) java.lang.String |
constantValue
|
Fields inherited from class com.ibm.dse.base.FormatElement |
---|
dataElementName, externalizer, name |
Constructor Summary | |
---|---|
ConstantFormat()
This constructor creates a ConstantFormat object. |
|
ConstantFormat(java.lang.String aName)
This constructor creates a new instance of the ConstantFormat class, which is obtained from the external definition files through aName. |
Method Summary | |
---|---|
java.lang.String[] |
extract(java.lang.String aString)
Extracts the length that is equal to the constantValue length. |
java.lang.String |
format(DataElement aDataElement)
Returns the constantValue. |
java.lang.String |
getConstantValue()
Gets the constantValue property (java.lang.String) value. |
java.lang.Object |
initializeFrom(Tag aTag)
Initializes a ConstantFormat with the aTag attributes. |
boolean |
isItConstant()
Returns true. |
void |
setConstantValue(java.lang.String aConstantValue)
Sets the constantValue property (java.lang.String) value. |
java.lang.String |
toString()
Returns a visual representation of the instance. |
Vector |
toStrings()
Returns a visual representation of this format element. |
DataElement |
unformat(java.lang.String aString,
DataElement aDataElement)
Verifies that the String is equal to the constantValue and, if it is not, it throws an Exception. |
Methods inherited from class com.ibm.dse.base.FormatElement |
---|
exceptionInfo, externalizer, format, format, getDataElementName, getExternalizer, getName, getTagName, isCacheable, isConstant, readExternal, readExternal, readObject, reinitialize, removeExternal, rootDecorated, setDataElementName, setExternalizer, setName, setSize, toTags, unformat, unformat, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
java.lang.String constantValue
Constructor Detail |
public ConstantFormat()
public ConstantFormat(java.lang.String aName) throws java.io.IOException
aName
- java.lang.StringMethod Detail |
public java.lang.String[] extract(java.lang.String aString)
extract
in class FormatElement
public java.lang.String format(DataElement aDataElement)
format
in class FormatElement
aDataElement
- DataElement
public java.lang.String getConstantValue()
setConstantValue(java.lang.String)
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException
initializeFrom
in interface Externalizable
initializeFrom
in class FormatElement
aTag
- com.ibm.dse.base.Tag
java.io.IOException
public boolean isItConstant()
isItConstant
in class FormatElement
public void setConstantValue(java.lang.String aConstantValue)
getConstantValue()
public java.lang.String toString()
toString
in class FormatElement
public Vector toStrings()
toStrings
in interface Externalizable
toStrings
in class FormatElement
public DataElement unformat(java.lang.String aString, DataElement aDataElement) throws DSEInvalidArgumentException
unformat
in class FormatElement
DSEInvalidArgumentException
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |