org.biomage.tools.generate_java
Class CreateJavaFile.WriteAttrInformation

java.lang.Object
  extended by org.biomage.tools.generate_java.CreateJavaFile.WriteAttrInformation
Direct Known Subclasses:
CreateJavaClassFile.WriteDataAttrInformation, CreateJavaFile.WriteAssociationAttrInformation
Enclosing class:
CreateJavaFile

protected class CreateJavaFile.WriteAttrInformation
extends java.lang.Object

Description: Inner class to write attribute information. Checks to see if the data type is an enum and adjusts the information accordingly.


Constructor Summary
protected CreateJavaFile.WriteAttrInformation()
          Description: C'tor for class.
 
Method Summary
protected  java.lang.String getDatatype(CreateFile.AttrInformation attr)
          Description: Pass through get method for datatype.
protected  void writeAttr(java.io.FileWriter writer, CreateFile.AttrInformation attr)
          Description: Writes itself to the file.
protected  void writeGetAndSet(java.io.FileWriter writer, CreateFile.AttrInformation attr)
          Description: Writes the attribute set and get methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CreateJavaFile.WriteAttrInformation

protected CreateJavaFile.WriteAttrInformation()
                                       throws java.lang.Exception
Description: C'tor for class.

Parameters:
writer: - to use to write to the Java class file.
attrInfo: - class to obtain the information to use to write the Java attributes.

Throws:
java.lang.Exception
Method Detail

writeAttr

protected void writeAttr(java.io.FileWriter writer,
                         CreateFile.AttrInformation attr)
                  throws java.lang.Exception
Description: Writes itself to the file.

Parameters:
writer: - FileWriter to used to write to the file.
attr: - information on the attribute.

Throws:
java.lang.Exception

getDatatype

protected java.lang.String getDatatype(CreateFile.AttrInformation attr)
                                throws java.lang.Exception
Description: Pass through get method for datatype. Changes 'any' to 'Object'

Returns:
datatype.

Throws:
java.lang.Exception

writeGetAndSet

protected void writeGetAndSet(java.io.FileWriter writer,
                              CreateFile.AttrInformation attr)
                       throws java.lang.Exception
Description: Writes the attribute set and get methods.

Parameters:
writer: - FileWriter to used to write to the file.
attr: - information on the attribute.

Throws:
java.lang.Exception