Class sunsoft.jws.visual.rt.type.AttributeConverter
All Packages Class Hierarchy This Package Previous Next Index
Class sunsoft.jws.visual.rt.type.AttributeConverter
java.lang.Object
|
+----sunsoft.jws.visual.rt.type.Converter
|
+----sunsoft.jws.visual.rt.type.AttributeConverter
- public class AttributeConverter
- extends Converter
This class converts Attributes to strings and back again.
- See Also:
- Attribute
-
AttributeConverter()
-
-
convertFromString(double, AttributeManager, String, String, String)
- Converts a string (type, name, and value) to an Attribute.
-
convertFromString(String)
- Call the convertFromString method that takes additionhal
arguments.
-
convertToCode(Object)
- Call the convertToCode method that takes more arguments instead.
-
convertToCodeBlock(String, Attribute, int, StringBuffer)
- Converts an attribute to the code that would set it for an
AttributeManager object.
-
convertToString(Object, StringBuffer)
- Converts an attribute to a string.
AttributeConverter
public AttributeConverter()
convertToString
public void convertToString(Object obj,
StringBuffer buf)
- Converts an attribute to a string.
- Parameters:
- obj - Attribute instance to convert
- buf - buffer to which to add the string
- Returns:
- string representation of an attribute (type, name, and value)
- Overrides:
- convertToString in class Converter
convertFromString
public Object convertFromString(String s)
- Call the convertFromString method that takes additionhal
arguments. An AttributeManager object is needed to operate on.
- Throws: Error
- when called
- Overrides:
- convertFromString in class Converter
convertFromString
public Object convertFromString(double version,
AttributeManager mgr,
String type,
String key,
String value)
- Converts a string (type, name, and value) to an Attribute.
- Parameters:
- version - description file version
- mgr - object in which the attribute will be used
- type - type of the attribute
- key - name of the attribute
- value - value of the attribute
- Returns:
- a new instance of Attribute
- Throws: ParseError
- when there is an error in one of the strings
convertToCodeBlock
public void convertToCodeBlock(String amName,
Attribute a,
int indent,
StringBuffer buf)
- Converts an attribute to the code that would set it for an
AttributeManager object.
- Parameters:
- amName - name of the AttributeManager
- a - attribute (which contains type, name, and value)
- indent - number of spaces to indent the code line(s)
- buf - buffer to which to add the code
- Overrides:
- convertToCodeBlock in class Converter
convertToCode
public String convertToCode(Object obj)
- Call the convertToCode method that takes more arguments instead.
- Throws: Error
- when called
- Overrides:
- convertToCode in class Converter
All Packages Class Hierarchy This Package Previous Next Index